medi-llm / docker-compose.yml
Preetham22's picture
docker: add .dockerignore, update gitignore, Dockerfile, and compose for volumes & envs
ed7984d
# docker-compose.yml
services:
medi-llm:
build: .
image: medi-llm:cpu
container_name: medi-llm
ports:
- "${PORT:-7860}:${PORT:-7860}"
environment:
HF_MODEL_REPO: "${HF_MODEL_REPO:-}" # ok if rempty
HUGGINGFACE_HUB_TOKEN: "${HUGGINGFACE_HUB_TOKEN-}" # ok if empty
GRADIO_SERVER_NAME: "0.0.0.0"
GRADIO_SERVER_PORT: "${PORT:-7860}"
MPLCONFIGDIR: "/tmp/mpl"
HF_HOME: "/root/.cache/huggingface" # inside container
volumes:
# Persist CSV/exports to your host (appears in ./exports)
- ./exports:/data/app/demo/exports
# Persist uploads to your host (appears in ./uploads)
- ./uploads:/data/app/demo/uploads
# Cache models between runs for speed
- ./hf-cache:/root/.cache/huggingface
# Live-mount code
- .:/app
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:${PORT:-7860}', timeout=2)"]
interval: 10s
timeout: 3s
retries: 5