37 lines
1.0 KiB
YAML
37 lines
1.0 KiB
YAML
|
services:
|
||
|
toxicity_api:
|
||
|
build: .
|
||
|
container_name: toxicity_assessment_api
|
||
|
ports:
|
||
|
- "8000:8000"
|
||
|
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"
|
||
|
restart: unless-stopped
|