Download docker-compose.yml from SiliconLanguage/open-asr-model-explorer: direct link, hf CLI and curl.
- Browser
- Download file 2.3 kB
-
https://huggingface.co/spaces/SiliconLanguage/open-asr-model-explorer/resolve/main/docker-compose.yml
- Command line
-
hf download hf://spaces/SiliconLanguage/open-asr-model-explorer/docker-compose.yml
-
curl -L -o docker-compose.yml https://huggingface.co/spaces/SiliconLanguage/open-asr-model-explorer/resolve/main/docker-compose.yml
2.3 kB
| # Open-ASR Model Explorer β Docker Compose | |
| # Usage: | |
| # docker compose up --build # start both services | |
| # docker compose up --build backend # backend only | |
| # docker compose down -v # stop and remove volumes | |
| # | |
| # The frontend is served by Nginx on http://localhost:3000. | |
| # The backend FastAPI API is available directly on http://localhost:8000. | |
| # Nginx proxies /api/* β http://backend:8000/* so the UI calls /api/β¦ . | |
| services: | |
| # ββ FastAPI + vLLM backend ββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| backend: | |
| build: | |
| context: ./backend | |
| dockerfile: Dockerfile | |
| ports: | |
| - "8000:8000" | |
| volumes: | |
| # Persist downloaded HuggingFace model weights across container restarts. | |
| - hf_cache:/hf_cache | |
| environment: | |
| - HF_HOME=/hf_cache | |
| - TRANSFORMERS_CACHE=/hf_cache | |
| - HF_TOKEN=${HF_TOKEN} | |
| - GPU_MEMORY_UTILIZATION=${GPU_MEMORY_UTILIZATION:-0.65} | |
| - OPENASR_ENGINE_INIT_TIMEOUT_S=${OPENASR_ENGINE_INIT_TIMEOUT_S:-120} | |
| - OPENASR_VLLM_MAX_MODEL_LEN=${OPENASR_VLLM_MAX_MODEL_LEN:-8192} | |
| - OPENASR_VLLM_ENFORCE_EAGER=${OPENASR_VLLM_ENFORCE_EAGER:-true} | |
| - ALLOW_MOCK_FALLBACK=${ALLOW_MOCK_FALLBACK:-false} | |
| # GPU access β requires the NVIDIA Container Toolkit. | |
| # Remove the `deploy` block entirely if running CPU-only. | |
| deploy: | |
| resources: | |
| reservations: | |
| devices: | |
| - driver: nvidia | |
| count: all | |
| capabilities: [gpu] | |
| restart: unless-stopped | |
| healthcheck: | |
| test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"] | |
| interval: 30s | |
| timeout: 10s | |
| start_period: 60s | |
| retries: 3 | |
| # ββ React / Nginx frontend ββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| frontend: | |
| build: | |
| context: ./frontend | |
| dockerfile: Dockerfile | |
| ports: | |
| - "3000:80" | |
| depends_on: | |
| backend: | |
| condition: service_healthy | |
| restart: unless-stopped | |
| volumes: | |
| # Named volume for HuggingFace model weight cache. | |
| hf_cache: | |