Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
vladd-bit committed Nov 28, 2024
2 parents 90108ba + a13f49a commit eebe546
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 6 deletions.
4 changes: 4 additions & 0 deletions deploy/general.env
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# any other variables that you may want to use go here

# This is used to explicitly inform systems that run on Apple silicon to emulate this architecture
# Remove if this causes issues on any other platform
DOCKER_DEFAULT_PLATFORM=linux/amd64
7 changes: 1 addition & 6 deletions deploy/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ services:
#---------------------------------------------------------------------------#
ocr-service-1:
container_name: ocr-service-1

image: cogstacksystems/cogstack-ocr-service:0.2.4
restart: always
# mem_swappiness: 0
Expand Down Expand Up @@ -193,7 +192,6 @@ services:

ocr-service-2:
container_name: ocr-service-2

image: cogstacksystems/cogstack-ocr-service:0.2.4
restart: always
# mem_swappiness: 0
Expand Down Expand Up @@ -383,7 +381,6 @@ services:
elasticsearch-1:
image: ${ELASTICSEARCH_DOCKER_IMAGE:-opensearchproject/opensearch:2.10.0}
container_name: elasticsearch-1

shm_size : 1024mb
restart: always
# mem_limit: 2g
Expand Down Expand Up @@ -476,7 +473,6 @@ services:
elasticsearch-2:
image: ${ELASTICSEARCH_DOCKER_IMAGE:-opensearchproject/opensearch:2.10.0}
container_name: elasticsearch-2

shm_size : 1024mb
restart: always
# mem_limit: 2g
Expand Down Expand Up @@ -939,7 +935,7 @@ services:
- GROUP_ID=${NIFI_GID:-1000}
- NIFI_WEB_PROXY_HOST=${NIFI_WEB_PROXY_HOST:-"0.0.0.0:8443,cogstack:8443,nifi:8443"}
- NIFI_WEB_PROXY_CONTEXT_PATH=${NIFI_WEB_PROXY_CONTEXT_PATH:-"/,/nifi,/nifi-api,/nifi-api/,/nifi/"}
- NIFI_INTERNAL_PORT=${NIFI_INTERNAL_PORT:-8443}
- NIFI_INTERNAL_PORT=${NIFI_INTERNAL_PORT:-8443}d
- NIFI_OUTPUT_PORT=${NIFI_OUTPUT_PORT:-8082}
- NIFI_INPUT_SOCKET_PORT=${NIFI_INPUT_SOCKET_PORT:-10000}
- NIFI_SECURITY_DIR=${NIFI_SECURITY_DIR:-../security/nifi_certificates/}
Expand Down Expand Up @@ -1062,7 +1058,6 @@ services:
# - no_proxy=$no_proxy
container_name: cogstack-jupyter-hub
restart: always

env_file:
- ./jupyter.env
environment:
Expand Down
24 changes: 24 additions & 0 deletions docs/deploy/main.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,30 @@ Common issues that can be encountered across services.
<br>
<br>

#### **Apple Silicon**

Many services cannot run natively on Apple Silicon (such as M1 and M2 architectures). Common error messages related to Apple silicon follow patterns similar to:
<br /><br/>
- `no match for platform in manifest`
<br /><br/>
<br /><br/>
- `no matching manifest for linux/arm64/v8 in the manifest list entries`
<br /><br/>
<br /><br/>
- `image with reference cogstacksystems/cogstack-ocr-service:0.2.4 was found but does not match the specified platform: wanted linux/arm64, actual: linux/amd64`
<br /><br/>
To solve these issues; Rosetta is required and enabled in Docker Desktop. Finally an environment variable is required to be set.

Rosetta can which can be installed via the following command:
```
softwareupdate --install-rosetta
```
When Rosetta and Docker Desktop are installed, Rosetta must be enabled. This done by going to Docker Desktop -> Setting -> General and enabling "Use Virtualization framework". After in the same settings go to "features in development" -> "Use Rosetta for x86/amd64 emulation on Apple Silicon". Finally execute the following command:
```
export DOCKER_DEFAULT_PLATFORM=linux/amd64
```
to set the environment variable. These issues are known to occur on the "cogstack-nifi", "cogstack-ocr-services" and "jupyter-hub" services and may occur on others.

#### **NiFi**

When dealing with contaminated deployments ( containers using volumes from previous instances ) :
Expand Down

0 comments on commit eebe546

Please sign in to comment.