vfx-2 / human-segmentation /docker-compose.yml
TaqiRaza512's picture
Initial commit
a103028
version: "3.9"
services:
human-seg:
build:
context: .
dockerfile: Dockerfile
container_name: human-seg
# Enable GPU support (requires nvidia-container-toolkit)
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
# Mount the repo to /app inside the container
volumes:
- .:/app
# Optional: mount datasets or models
- /home/isam/models:/models
- /home/isam/datasets:/datasets
# Environment variables
environment:
- PYTHONUNBUFFERED=1
- PYTHONPATH=/app
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=compute,utility
# Default command — can be changed to your app’s entrypoint
command: bash
# Map ports if your app exposes a server (e.g. FastAPI/Streamlit)
# ports:
# - "7860:7860"
# Use host networking for simplicity (optional)
# network_mode: host
# Restart policy (useful for production)
restart: unless-stopped