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
|
|
|
|
- USE_CUDA=False # Установите True, если используете GPU и это поддерживается
|
|
|
|
- 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
|
|
|
|
|
|
|
|
celery_worker:
|
|
|
|
build: .
|
|
|
|
container_name: celery_worker
|
|
|
|
command: celery -A app.worker worker --loglevel=info
|
|
|
|
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"
|
2024-10-22 23:10:51 +02:00
|
|
|
sysctls:
|
|
|
|
vm.overcommit_memory: 1
|
2024-10-22 22:51:03 +02:00
|
|
|
restart: unless-stopped
|