Skip to content

armgit / ODS

Public Imported from GitHub
0

ODS V3 Pre-Release: Public testing and refinement ahead of the official V3 launch. Turn your PC, Mac, or Linux box into a private AI server.

1.6 KB
Raw Blame
services:
  whisper:
    image: ${WHISPER_IMAGE:-ghcr.io/speaches-ai/speaches:0.9.0-rc.3-cpu@sha256:2163775b6df5e451a71200e8f675fed68dbd8ab184fc604453d549e486f22fd2}
    container_name: ods-whisper
    restart: unless-stopped
    security_opt:
      - no-new-privileges:true
    environment:
      # speaches reads the STT eviction timeout from STT_MODEL_TTL (default 300s).
      - STT_MODEL_TTL=86400
      # The Hugging Face hub client reports usage by default.
      - HF_HUB_DISABLE_TELEMETRY=1
    # Use a shell wrapper to wait for the bind-mounted entrypoint to become
    # visible, then run it through sh. Windows bind mounts can expose scripts
    # without a usable executable bit even when the file is readable.
    entrypoint: ["/bin/sh", "-c", "until [ -f /app/docker-entrypoint.sh ]; do sleep 0.5; done; exec /bin/sh /app/docker-entrypoint.sh"]
    volumes:
      - ./data/whisper:/home/ubuntu/.cache/huggingface/hub:z
      - ./extensions/services/whisper/docker-entrypoint.sh:/app/docker-entrypoint.sh:ro,z
    ports:
      - "127.0.0.1:${WHISPER_PORT:-9000}:8000"
    deploy:
      resources:
        limits:
          cpus: '${WHISPER_CPU_LIMIT:-1.0}'
          memory: 4G
        reservations:
          cpus: '${WHISPER_CPU_RESERVATION:-0.5}'
          memory: 1G
    healthcheck:
      test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health')"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 60s
    logging:
      driver: "json-file"
      options:
        max-size: "10m"
        max-file: "3"