update ferret for gpu
This commit is contained in:
@@ -20,8 +20,9 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- FERRETDB_POSTGRESQL_URL=postgres://postgres:5432/whishper
|
- FERRETDB_POSTGRESQL_URL=postgres://postgres:5432/whishper
|
||||||
|
|
||||||
translate:
|
translate-cpu:
|
||||||
container_name: whisper-libretranslate
|
container_name: whisper-libretranslate
|
||||||
|
profiles: ["cpu"]
|
||||||
image: libretranslate/libretranslate:latest
|
image: libretranslate/libretranslate:latest
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
@@ -35,15 +36,54 @@ services:
|
|||||||
#LT_UPDATE_MODELS: True
|
#LT_UPDATE_MODELS: True
|
||||||
expose:
|
expose:
|
||||||
- 5000
|
- 5000
|
||||||
|
networks:
|
||||||
|
default:
|
||||||
|
aliases:
|
||||||
|
- translate
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ['CMD-SHELL', './venv/bin/python scripts/healthcheck.py']
|
test: ['CMD-SHELL', './venv/bin/python scripts/healthcheck.py']
|
||||||
interval: 15s
|
interval: 2s
|
||||||
timeout: 10s
|
timeout: 3s
|
||||||
start_period: 5s
|
|
||||||
retries: 5
|
retries: 5
|
||||||
|
|
||||||
transcription-api:
|
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
|
container_name: whisper-api
|
||||||
|
profiles: ["cpu"]
|
||||||
image: pluja/whishper-transcription-api:latest
|
image: pluja/whishper-transcription-api:latest
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
@@ -53,10 +93,41 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- WHISPER_MODELS_DIR=/app/models
|
- WHISPER_MODELS_DIR=/app/models
|
||||||
- UPLOAD_DIR=/app/uploads
|
- UPLOAD_DIR=/app/uploads
|
||||||
|
networks:
|
||||||
|
default:
|
||||||
|
aliases:
|
||||||
|
- transcription-api
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
expose:
|
expose:
|
||||||
- 8000
|
- 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:
|
whishper-backend:
|
||||||
container_name: whishper-backend
|
container_name: whishper-backend
|
||||||
image: pluja/whishper-backend:latest
|
image: pluja/whishper-backend:latest
|
||||||
@@ -65,19 +136,14 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ./whishper_data/uploads:/app/uploads
|
- ./whishper_data/uploads:/app/uploads
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
|
||||||
- FERRETDB_MONGO_URL=mongodb://${DB_USER:-whishper}:${DB_PASS:-whishper}@mongo:27017/?authMechanism=PLAIN
|
|
||||||
depends_on:
|
depends_on:
|
||||||
translate:
|
mongo:
|
||||||
condition: service_healthy
|
|
||||||
transcription-api:
|
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: curl --fail http://localhost:8080/api/transcriptions || exit 1
|
test: curl --fail http://localhost:8080/api/transcriptions || exit 1
|
||||||
interval: 15s
|
interval: 2s
|
||||||
timeout: 10s
|
timeout: 2s
|
||||||
retries: 5
|
retries: 5
|
||||||
start_period: 5s
|
|
||||||
expose:
|
expose:
|
||||||
- 8080
|
- 8080
|
||||||
|
|
||||||
@@ -91,10 +157,7 @@ services:
|
|||||||
PUBLIC_INTERNAL_API_HOST: "http://nginx:80"
|
PUBLIC_INTERNAL_API_HOST: "http://nginx:80"
|
||||||
PUBLIC_TRANSLATION_API_HOST: ""
|
PUBLIC_TRANSLATION_API_HOST: ""
|
||||||
PUBLIC_API_HOST: ${WHISHPER_HOST:-}
|
PUBLIC_API_HOST: ${WHISHPER_HOST:-}
|
||||||
PUBLIC_WHISHPER_GPU: ${WHISHPER_GPU:-false}
|
PUBLIC_WHISHPER_PROFILE: ${COMPOSE_PROFILES:-false}
|
||||||
depends_on:
|
|
||||||
transcription-api:
|
|
||||||
condition: service_healthy
|
|
||||||
expose:
|
expose:
|
||||||
- 3000
|
- 3000
|
||||||
|
|
||||||
@@ -108,4 +171,4 @@ services:
|
|||||||
whishper-backend:
|
whishper-backend:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
ports:
|
ports:
|
||||||
- 8082:80
|
- 8082:80
|
||||||
|
|||||||
Reference in New Issue
Block a user