-
Notifications
You must be signed in to change notification settings - Fork 2
/
compose.yaml
55 lines (53 loc) · 1.45 KB
/
compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
services:
redis:
container_name: redis
image: redis/redis-stack-server:latest
init: true
volumes:
- ./tmp/redis:/data
- ./redis.conf:/redis-stack.conf
healthcheck:
test: ['CMD-SHELL', 'redis-cli -h localhost -p 6379 ping']
interval: 5s
caddy:
container_name: caddy
init: true
environment:
BACKEND_URL: ${BACKEND_URL}:${BACKEND_PORT}
BACKEND_INTERNAL_URL: backend:${BACKEND_PORT}
volumes: [./Caddyfile:/etc/caddy/Caddyfile]
ports:
- '${BACKEND_PORT}:${BACKEND_PORT}'
- 80:80
build:
context: .
dockerfile: Dockerfile.caddy
command:
- |
caddy fmt --overwrite /etc/caddy/Caddyfile
caddy run --config /etc/caddy/Caddyfile --adapter caddyfile
backend:
container_name: backend
init: true
environment:
REDIS_URL: redis://redis:6379
SERVER_PORT: ${BACKEND_PORT}
CT2_USE_EXPERIMENTAL_PACKED_GEMM: ${CT2_USE_EXPERIMENTAL_PACKED_GEMM}
OMP_NUM_THREADS: ${OMP_NUM_THREADS}
security_opt: [seccomp:unconfined]
shm_size: 1G
ulimits:
stack: 67108864
memlock:
soft: -1
hard: -1
volumes:
- ./tmp/backend/huggingface:/home/user/.cache/huggingface/hub
- ./tmp/backend/torch:/home/user/.cache/torch
- ./tmp/backend/nltk:/home/user/.cache/nltk
build:
context: .
dockerfile: Dockerfile.backend
depends_on:
redis:
condition: service_healthy