From feb34b87091f0bf8c8d7e722939b08c08db23e3d Mon Sep 17 00:00:00 2001 From: pluja Date: Fri, 27 Oct 2023 16:17:31 +0200 Subject: [PATCH] small project updates --- .gitignore | 1 + docker-compose.dev.yml | 27 ++++++---- docker-compose.gpu.yml | 119 ----------------------------------------- 3 files changed, 19 insertions(+), 128 deletions(-) delete mode 100644 docker-compose.gpu.yml diff --git a/.gitignore b/.gitignore index 428d24c..a31b381 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ whisper_models/ *_WHSHPR_* .env .DS_Store +*.beta.yml diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 75767a3..626fd13 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -1,8 +1,17 @@ version: '3.9' services: - transcription-api: - build: ./transcription-api + transcription-api-gpu: + build: + context: ./transcription-api + dockerfile: Dockerfile.gpu + ports: + - 8000:8000 + + transcription-api-cpu: + build: + context: ./transcription-api + dockerfile: Dockerfile ports: - 8000:8000 @@ -14,11 +23,11 @@ services: ports: - 27017:27017 - whishper-backend: - build: ./backend - ports: - - 8080:8080 + #whishper-backend: + # build: ./backend + # ports: + # - 8080:8080 - whishper-frontend: - build: - context: ./frontend \ No newline at end of file + #whishper-frontend: + # build: + # context: ./frontend \ No newline at end of file diff --git a/docker-compose.gpu.yml b/docker-compose.gpu.yml deleted file mode 100644 index d2d9af2..0000000 --- a/docker-compose.gpu.yml +++ /dev/null @@ -1,119 +0,0 @@ -version: "3.9" - -services: - mongo: - image: mongo - env_file: - - .env - restart: unless-stopped - volumes: - - ./whishper_data/db_data:/data/db - - ./whishper_data/db_data/logs/:/var/log/mongodb/ - environment: - MONGO_INITDB_ROOT_USERNAME: ${DB_USER:-whishper} - MONGO_INITDB_ROOT_PASSWORD: ${DB_PASS:-whishper} - expose: - - 27017 - command: ['--logpath', '/var/log/mongodb/mongod.log'] - healthcheck: - test: mongosh --eval 'db.runCommand("ping").ok' --quiet - interval: 2s - timeout: 3s - retries: 5 - - translate: - container_name: whisper-libretranslate - 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 - healthcheck: - test: ['CMD-SHELL', './venv/bin/python scripts/healthcheck.py'] - interval: 15s - timeout: 10s - start_period: 5s - retries: 5 - - transcription-api: - container_name: whisper-api - 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 - 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 - environment: - - FERRETDB_MONGO_URL=mongodb://${DB_USER:-whishper}:${DB_PASS:-whishper}@mongo:27017/?authMechanism=PLAIN - depends_on: - translate: - condition: service_healthy - transcription-api: - condition: service_healthy - healthcheck: - test: curl --fail http://localhost:8080/api/transcriptions || exit 1 - interval: 15s - timeout: 10s - retries: 5 - start_period: 5s - 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_GPU: ${WHISHPER_GPU:-true} - depends_on: - transcription-api: - condition: service_healthy - 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 \ No newline at end of file