Files
whishper/docker-compose.ferret.yml
2023-10-27 17:11:49 +02:00

175 lines
4.2 KiB
YAML

version: "3.9"
services:
postgres:
image: postgres
env_file:
- .env
environment:
- POSTGRES_USER=${DB_USER:-whishper}
- POSTGRES_PASSWORD=${DB_PASS:-whishper}
- POSTGRES_DB=whishper
volumes:
- ./whishper_data/db_data/ferret:/var/lib/postgresql/data
mongo:
image: ghcr.io/ferretdb/ferretdb
restart: on-failure
ports:
- 27017:27017
environment:
- FERRETDB_POSTGRESQL_URL=postgres://postgres:5432/whishper
translate-cpu:
container_name: whisper-libretranslate
profiles: ["cpu"]
image: libretranslate/libretranslate:latest
restart: unless-stopped
volumes:
- ./whishper_data/libretranslate/data:/home/libretranslate/.local/share
- ./whishper_data/libretranslate/cache:/home/libretranslate/.local/cache
env_file:
- .env
tty: true
environment:
LT_DISABLE_WEB_UI: True
#LT_UPDATE_MODELS: True
expose:
- 5000
networks:
default:
aliases:
- translate
healthcheck:
test: ['CMD-SHELL', './venv/bin/python scripts/healthcheck.py']
interval: 2s
timeout: 3s
retries: 5
translate-gpu:
container_name: whisper-libretranslate
image: libretranslate/libretranslate:latest-cuda
profiles: ["gpu"]
restart: unless-stopped
volumes:
- ./whishper_data/libretranslate/data:/home/libretranslate/.local/share
- ./whishper_data/libretranslate/cache:/home/libretranslate/.local/cache
env_file:
- .env
user: root
tty: true
environment:
LT_DISABLE_WEB_UI: True
LT_LOAD_ONLY: ${LT_LOAD_ONLY:-en,fr,es}
#LT_UPDATE_MODELS: True
expose:
- 5000
networks:
default:
aliases:
- translate
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
healthcheck:
test: ['CMD-SHELL', './venv/bin/python scripts/healthcheck.py']
interval: 2s
timeout: 3s
retries: 5
transcription-api-cpu:
container_name: whisper-api
profiles: ["cpu"]
image: pluja/whishper-transcription-api:latest
env_file:
- .env
volumes:
- ./whishper_data/whisper_models:/app/models
- ./whishper_data/uploads:/app/uploads
environment:
- WHISPER_MODELS_DIR=/app/models
- UPLOAD_DIR=/app/uploads
networks:
default:
aliases:
- transcription-api
restart: unless-stopped
expose:
- 8000
transcription-api-gpu:
container_name: whisper-api
profiles: ["gpu"]
image: pluja/whishper-transcription-api:latest-gpu
env_file:
- .env
volumes:
- ./whishper_data/whisper_models:/app/models
- ./whishper_data/uploads:/app/uploads
environment:
WHISPER_MODELS_DIR: /app/models
UPLOAD_DIR: /app/uploads
restart: unless-stopped
expose:
- 8000
networks:
default:
aliases:
- transcription-api
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
whishper-backend:
container_name: whishper-backend
image: pluja/whishper-backend:latest
env_file:
- .env
volumes:
- ./whishper_data/uploads:/app/uploads
restart: unless-stopped
depends_on:
mongo:
condition: service_healthy
healthcheck:
test: curl --fail http://localhost:8080/api/transcriptions || exit 1
interval: 2s
timeout: 2s
retries: 5
expose:
- 8080
whishper-frontend:
container_name: whishper-web
image: pluja/whishper-frontend:latest
env_file:
- .env
restart: unless-stopped
environment:
PUBLIC_INTERNAL_API_HOST: "http://nginx:80"
PUBLIC_TRANSLATION_API_HOST: ""
PUBLIC_API_HOST: ${WHISHPER_HOST:-}
PUBLIC_WHISHPER_PROFILE: ${COMPOSE_PROFILES:-false}
expose:
- 3000
nginx:
image: nginx:1
restart: unless-stopped
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- ./whishper_data/uploads:/app/uploads
depends_on:
whishper-backend:
condition: service_healthy
ports:
- 8082:80