Spaces:
Sleeping
Sleeping
File size: 1,046 Bytes
a8ee0db |
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 |
version: '3.8'
services:
model-api:
build:
context: .
dockerfile: Dockerfile
container_name: projet_fil_rouge_api-model-api-1
ports:
- "9500:8000"
env_file:
- .env
restart: unless-stopped
environment:
- HF_HOME=/app/cache
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
volumes:
- ./.cache/huggingface:/app/cache
worker:
build:
context: .
dockerfile: Dockerfile
command: celery -A tasks.worker_celery:celery_app worker --loglevel=info
restart: unless-stopped
depends_on:
- model-api
- redis
env_file:
- .env
environment:
- HF_HOME=/app/cache
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
volumes:
- ./.cache/huggingface:/app/cache
redis:
image: "redis:alpine"
ports:
- "6379:6379"
restart: unless-stopped
volumes:
huggingface_cache: |