mirror of
https://github.com/denizsafak/abogen.git
synced 2026-07-18 13:40:27 +02:00
feat: Update Docker configuration for GPU support and remove deprecated compose file
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
abogen:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: abogen/Dockerfile
|
||||
args:
|
||||
TORCH_INDEX_URL: ${TORCH_INDEX_URL:-https://download.pytorch.org/whl/cu124}
|
||||
TORCH_VERSION: ${TORCH_VERSION:-}
|
||||
image: abogen:latest
|
||||
ports:
|
||||
- "${ABOGEN_PORT:-8000}:8000"
|
||||
volumes:
|
||||
- ${ABOGEN_DATA:-./data}:/data
|
||||
environment:
|
||||
ABOGEN_HOST: 0.0.0.0
|
||||
ABOGEN_PORT: 8000
|
||||
ABOGEN_UPLOAD_ROOT: /data/uploads
|
||||
ABOGEN_OUTPUT_ROOT: /data/outputs
|
||||
# --- GPU support -----------------------------------------------------
|
||||
# These settings assume the NVIDIA Container Toolkit is installed.
|
||||
# Leave them in place for GPU acceleration; comment out the entire block
|
||||
# below if you are deploying to a CPU-only host.
|
||||
deploy:
|
||||
resources:
|
||||
reservations:
|
||||
devices:
|
||||
- capabilities: [gpu]
|
||||
# driver: nvidia
|
||||
# count: all
|
||||
# Runtime flag is only honored by legacy docker-compose (v1) CLI.
|
||||
# Uncomment if you're still using it:
|
||||
# runtime: nvidia
|
||||
restart: unless-stopped
|
||||
Reference in New Issue
Block a user