-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Docker] Added
compose.cpu.yaml
for Apple silicon (#29)
- Added `compose.cpu.yaml` for Apple silicon - Updated CHANGELOG --------- Co-authored-by: Jiaqi <ellm@Jiaqis-MacBook-Pro.local> Co-authored-by: Jia Huei Tan <tanjiahuei@gmail.com>
- Loading branch information
1 parent
15c0bed
commit 1cd1446
Showing
2 changed files
with
192 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,182 @@ | ||
services: | ||
infinity: | ||
image: michaelf34/infinity:0.0.70 | ||
container_name: jamai_infinity | ||
command: ["v2", "--engine", "torch", "--port", "6909", "--model-warmup", "--model-id", "${EMBEDDING_MODEL}", "--model-id", "${RERANKER_MODEL}"] | ||
healthcheck: | ||
test: ["CMD-SHELL", "curl --fail http://localhost:6909/health"] | ||
interval: 10s | ||
timeout: 2s | ||
retries: 20 | ||
start_period: 10s | ||
restart: unless-stopped | ||
env_file: | ||
- ../.env | ||
volumes: | ||
- ${PWD}/infinity_cache:/app/.cache | ||
networks: | ||
- jamai | ||
|
||
unstructuredio: | ||
image: downloads.unstructured.io/unstructured-io/unstructured-api:latest | ||
platform: linux/amd64 | ||
entrypoint: ["/usr/bin/env", "bash", "-c", "uvicorn prepline_general.api.app:app --log-config logger_config.yaml --port 6989 --host 0.0.0.0"] | ||
healthcheck: | ||
test: ["CMD-SHELL", "wget http://localhost:6989/healthcheck -O /dev/null || exit 1"] | ||
interval: 10s | ||
timeout: 2s | ||
retries: 20 | ||
start_period: 10s | ||
restart: unless-stopped | ||
networks: | ||
- jamai | ||
|
||
docio: | ||
build: | ||
context: .. | ||
dockerfile: docker/Dockerfile.docio | ||
image: jamai/docio | ||
pull_policy: build | ||
command: ["python", "-m", "docio.entrypoints.api"] | ||
healthcheck: | ||
test: ["CMD-SHELL", "curl --fail http://localhost:6979/health || exit 1"] | ||
interval: 10s | ||
timeout: 2s | ||
retries: 20 | ||
start_period: 10s | ||
restart: unless-stopped | ||
env_file: | ||
- ../.env | ||
networks: | ||
- jamai | ||
|
||
dragonfly: | ||
image: "docker.dragonflydb.io/dragonflydb/dragonfly" | ||
ulimits: | ||
memlock: -1 | ||
healthcheck: | ||
test: ["CMD-SHELL", "nc -z localhost 6379 || exit 1"] | ||
interval: 10s | ||
timeout: 2s | ||
retries: 20 | ||
start_period: 10s | ||
# For better performance, consider `host` mode instead `port` to avoid docker NAT. | ||
# `host` mode is NOT currently supported in Swarm Mode. | ||
# https://docs.docker.com/compose/compose-file/compose-file-v3/#network_mode | ||
# network_mode: "host" | ||
# volumes: | ||
# - ${PWD}/dragonflydata:/data | ||
networks: | ||
- jamai | ||
|
||
owl: | ||
build: | ||
context: .. | ||
dockerfile: docker/Dockerfile.owl | ||
image: jamai/owl | ||
pull_policy: build | ||
command: ["python", "-m", "owl.entrypoints.api"] | ||
depends_on: | ||
infinity: | ||
condition: service_healthy | ||
unstructuredio: | ||
condition: service_healthy | ||
docio: | ||
condition: service_healthy | ||
dragonfly: | ||
condition: service_healthy | ||
healthcheck: | ||
test: ["CMD-SHELL", "curl --fail localhost:6969/api/health || exit 1"] | ||
interval: 10s | ||
timeout: 2s | ||
retries: 20 | ||
start_period: 10s | ||
restart: unless-stopped | ||
env_file: | ||
- ../.env | ||
volumes: | ||
- ${PWD}/db:/app/api/db | ||
- ${PWD}/logs:/app/api/logs | ||
- ${PWD}/file:/app/api/file | ||
ports: | ||
- "${API_PORT:-6969}:6969" | ||
networks: | ||
- jamai | ||
|
||
starling: | ||
extends: | ||
service: owl | ||
entrypoint: | ||
- /bin/bash | ||
- -c | ||
- | | ||
celery -A owl.entrypoints.starling worker --loglevel=info --max-memory-per-child 65536 --autoscale=2,4 & \ | ||
celery -A owl.entrypoints.starling beat --loglevel=info & \ | ||
FLOWER_UNAUTHENTICATED_API=1 celery -A owl.entrypoints.starling flower --loglevel=info | ||
command: !reset [] | ||
depends_on: | ||
owl: | ||
condition: service_healthy | ||
healthcheck: | ||
test: ["CMD-SHELL", "curl --fail http://localhost:5555/api/workers || exit 1"] | ||
interval: 10s | ||
timeout: 2s | ||
retries: 20 | ||
start_period: 10s | ||
ports: !override | ||
- "${STARLING_PORT:-5555}:5555" | ||
|
||
frontend: | ||
build: | ||
context: .. | ||
dockerfile: docker/Dockerfile.frontend | ||
args: | ||
JAMAI_URL: ${JAMAI_URL} | ||
PUBLIC_JAMAI_URL: ${PUBLIC_JAMAI_URL} | ||
PUBLIC_IS_SPA: ${PUBLIC_IS_SPA} | ||
CHECK_ORIGIN: ${CHECK_ORIGIN} | ||
image: jamai/frontend | ||
pull_policy: build | ||
command: ["node", "server"] | ||
depends_on: | ||
owl: | ||
condition: service_healthy | ||
healthcheck: | ||
test: ["CMD-SHELL", "curl --fail localhost:4000 || exit 1"] | ||
interval: 10s | ||
timeout: 2s | ||
retries: 20 | ||
start_period: 10s | ||
restart: unless-stopped | ||
environment: | ||
- NODE_ENV=production | ||
- BODY_SIZE_LIMIT=Infinity | ||
env_file: | ||
- ../.env | ||
ports: | ||
- "${FRONTEND_PORT:-4000}:4000" | ||
networks: | ||
- jamai | ||
|
||
# By default, minio service is not enabled, and only used for testing. use --profile minio along docker compose up if minio is needed. | ||
minio: | ||
profiles: ["minio"] | ||
image: minio/minio | ||
entrypoint: /bin/sh -c " minio server /data --console-address ':9001' & until (mc config host add myminio http://localhost:9000 $${MINIO_ROOT_USER} $${MINIO_ROOT_PASSWORD}) do echo '...waiting...' && sleep 1; done; mc mb myminio/file; wait " | ||
environment: | ||
MINIO_ROOT_USER: minioadmin | ||
MINIO_ROOT_PASSWORD: minioadmin | ||
healthcheck: | ||
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"] | ||
interval: 10s | ||
timeout: 2s | ||
retries: 20 | ||
start_period: 10s | ||
ports: | ||
- "9000:9000" | ||
- "9001:9001" | ||
networks: | ||
- jamai | ||
|
||
networks: | ||
jamai: |