Skip to content

Commit 1cd1446

Browse files
Jiaqi0602Jiaqijiahuei
authored
[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>
1 parent 15c0bed commit 1cd1446

File tree

2 files changed

+192
-0
lines changed

2 files changed

+192
-0
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1414

1515
- The version number mentioned here refers to the cloud version. For each release, all SDKs will have the same major and minor version, but their patch version may differ. For example, latest Python SDK might be `v0.2.0` whereas TS SDK might be `v0.2.1`, but both will be compatible with release `v0.2`.
1616

17+
## [v0.3.1] (2024-11-26)
18+
19+
This is a bug fix release for frontend code. SDKs are not affected.
20+
21+
### CHANGES / FIXED
22+
23+
Frontend
24+
25+
- Enable Projects for OSS
26+
1727
## [v0.3] (2024-11-20)
1828

1929
### ADDED

docker/compose.mac.yml

Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
services:
2+
infinity:
3+
image: michaelf34/infinity:0.0.70
4+
container_name: jamai_infinity
5+
command: ["v2", "--engine", "torch", "--port", "6909", "--model-warmup", "--model-id", "${EMBEDDING_MODEL}", "--model-id", "${RERANKER_MODEL}"]
6+
healthcheck:
7+
test: ["CMD-SHELL", "curl --fail http://localhost:6909/health"]
8+
interval: 10s
9+
timeout: 2s
10+
retries: 20
11+
start_period: 10s
12+
restart: unless-stopped
13+
env_file:
14+
- ../.env
15+
volumes:
16+
- ${PWD}/infinity_cache:/app/.cache
17+
networks:
18+
- jamai
19+
20+
unstructuredio:
21+
image: downloads.unstructured.io/unstructured-io/unstructured-api:latest
22+
platform: linux/amd64
23+
entrypoint: ["/usr/bin/env", "bash", "-c", "uvicorn prepline_general.api.app:app --log-config logger_config.yaml --port 6989 --host 0.0.0.0"]
24+
healthcheck:
25+
test: ["CMD-SHELL", "wget http://localhost:6989/healthcheck -O /dev/null || exit 1"]
26+
interval: 10s
27+
timeout: 2s
28+
retries: 20
29+
start_period: 10s
30+
restart: unless-stopped
31+
networks:
32+
- jamai
33+
34+
docio:
35+
build:
36+
context: ..
37+
dockerfile: docker/Dockerfile.docio
38+
image: jamai/docio
39+
pull_policy: build
40+
command: ["python", "-m", "docio.entrypoints.api"]
41+
healthcheck:
42+
test: ["CMD-SHELL", "curl --fail http://localhost:6979/health || exit 1"]
43+
interval: 10s
44+
timeout: 2s
45+
retries: 20
46+
start_period: 10s
47+
restart: unless-stopped
48+
env_file:
49+
- ../.env
50+
networks:
51+
- jamai
52+
53+
dragonfly:
54+
image: "docker.dragonflydb.io/dragonflydb/dragonfly"
55+
ulimits:
56+
memlock: -1
57+
healthcheck:
58+
test: ["CMD-SHELL", "nc -z localhost 6379 || exit 1"]
59+
interval: 10s
60+
timeout: 2s
61+
retries: 20
62+
start_period: 10s
63+
# For better performance, consider `host` mode instead `port` to avoid docker NAT.
64+
# `host` mode is NOT currently supported in Swarm Mode.
65+
# https://docs.docker.com/compose/compose-file/compose-file-v3/#network_mode
66+
# network_mode: "host"
67+
# volumes:
68+
# - ${PWD}/dragonflydata:/data
69+
networks:
70+
- jamai
71+
72+
owl:
73+
build:
74+
context: ..
75+
dockerfile: docker/Dockerfile.owl
76+
image: jamai/owl
77+
pull_policy: build
78+
command: ["python", "-m", "owl.entrypoints.api"]
79+
depends_on:
80+
infinity:
81+
condition: service_healthy
82+
unstructuredio:
83+
condition: service_healthy
84+
docio:
85+
condition: service_healthy
86+
dragonfly:
87+
condition: service_healthy
88+
healthcheck:
89+
test: ["CMD-SHELL", "curl --fail localhost:6969/api/health || exit 1"]
90+
interval: 10s
91+
timeout: 2s
92+
retries: 20
93+
start_period: 10s
94+
restart: unless-stopped
95+
env_file:
96+
- ../.env
97+
volumes:
98+
- ${PWD}/db:/app/api/db
99+
- ${PWD}/logs:/app/api/logs
100+
- ${PWD}/file:/app/api/file
101+
ports:
102+
- "${API_PORT:-6969}:6969"
103+
networks:
104+
- jamai
105+
106+
starling:
107+
extends:
108+
service: owl
109+
entrypoint:
110+
- /bin/bash
111+
- -c
112+
- |
113+
celery -A owl.entrypoints.starling worker --loglevel=info --max-memory-per-child 65536 --autoscale=2,4 & \
114+
celery -A owl.entrypoints.starling beat --loglevel=info & \
115+
FLOWER_UNAUTHENTICATED_API=1 celery -A owl.entrypoints.starling flower --loglevel=info
116+
command: !reset []
117+
depends_on:
118+
owl:
119+
condition: service_healthy
120+
healthcheck:
121+
test: ["CMD-SHELL", "curl --fail http://localhost:5555/api/workers || exit 1"]
122+
interval: 10s
123+
timeout: 2s
124+
retries: 20
125+
start_period: 10s
126+
ports: !override
127+
- "${STARLING_PORT:-5555}:5555"
128+
129+
frontend:
130+
build:
131+
context: ..
132+
dockerfile: docker/Dockerfile.frontend
133+
args:
134+
JAMAI_URL: ${JAMAI_URL}
135+
PUBLIC_JAMAI_URL: ${PUBLIC_JAMAI_URL}
136+
PUBLIC_IS_SPA: ${PUBLIC_IS_SPA}
137+
CHECK_ORIGIN: ${CHECK_ORIGIN}
138+
image: jamai/frontend
139+
pull_policy: build
140+
command: ["node", "server"]
141+
depends_on:
142+
owl:
143+
condition: service_healthy
144+
healthcheck:
145+
test: ["CMD-SHELL", "curl --fail localhost:4000 || exit 1"]
146+
interval: 10s
147+
timeout: 2s
148+
retries: 20
149+
start_period: 10s
150+
restart: unless-stopped
151+
environment:
152+
- NODE_ENV=production
153+
- BODY_SIZE_LIMIT=Infinity
154+
env_file:
155+
- ../.env
156+
ports:
157+
- "${FRONTEND_PORT:-4000}:4000"
158+
networks:
159+
- jamai
160+
161+
# By default, minio service is not enabled, and only used for testing. use --profile minio along docker compose up if minio is needed.
162+
minio:
163+
profiles: ["minio"]
164+
image: minio/minio
165+
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 "
166+
environment:
167+
MINIO_ROOT_USER: minioadmin
168+
MINIO_ROOT_PASSWORD: minioadmin
169+
healthcheck:
170+
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
171+
interval: 10s
172+
timeout: 2s
173+
retries: 20
174+
start_period: 10s
175+
ports:
176+
- "9000:9000"
177+
- "9001:9001"
178+
networks:
179+
- jamai
180+
181+
networks:
182+
jamai:

0 commit comments

Comments
 (0)