toxic-detector/docker-compose.yml

38 lines
966 B
YAML
Raw Normal View History

2024-10-22 22:51:03 +02:00
services:
toxicity_api:
build: .
container_name: toxicity_assessment_api
ports:
2024-10-22 22:54:00 +02:00
- "8002:8002"
2024-10-22 22:51:03 +02:00
environment:
- MODEL_CHECKPOINT=cointegrated/rubert-tiny-toxicity
2024-10-23 00:20:53 +02:00
- USE_CUDA=False
2024-10-22 22:51:03 +02:00
- REDIS_URL=redis://redis:6379/0
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
depends_on:
- redis
2024-10-22 23:13:37 +02:00
- celery_worker
2024-10-22 22:51:03 +02:00
restart: unless-stopped
celery_worker:
build: .
container_name: celery_worker
2024-10-22 23:13:37 +02:00
command: celery -A app.tasks worker --loglevel=info
2024-10-22 22:51:03 +02:00
environment:
- MODEL_CHECKPOINT=cointegrated/rubert-tiny-toxicity
- USE_CUDA=False
- REDIS_URL=redis://redis:6379/0
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
depends_on:
- redis
restart: unless-stopped
redis:
image: redis:7-alpine
container_name: redis
ports:
- "6379:6379"
restart: unless-stopped