Quantize_Any_Neural_Network / docker-compose.yml
AI Agent
Deploy to Spaces
a0098d0
# Docker Compose for local development with GPU support
services:
# Full application (frontend + backend)
app:
build:
context: .
dockerfile: Dockerfile
ports:
- "7860:7860"
environment:
- CUDA_VISIBLE_DEVICES=0
volumes:
- ./models:/app/models
- ./cache:/app/cache
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [ gpu ]
restart: unless-stopped
# Development mode: separate frontend and backend
backend-dev:
build:
context: .
dockerfile: Dockerfile
target: python-base
command: python -m uvicorn backend.api.main:app --host 0.0.0.0 --port 8000 --reload
ports:
- "8000:8000"
volumes:
- ./backend:/app/backend
- ./models:/app/models
environment:
- CUDA_VISIBLE_DEVICES=0
profiles:
- dev
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [ gpu ]
frontend-dev:
image: node:20-alpine
working_dir: /app
command: sh -c "npm install && npm run dev -- --host"
ports:
- "5173:5173"
volumes:
- ./frontend:/app
- /app/node_modules
environment:
- VITE_API_URL=http://localhost:8000/api
profiles:
- dev
# CPU-only version (no GPU)
app-cpu:
build:
context: .
dockerfile: Dockerfile
ports:
- "7860:7860"
volumes:
- ./models:/app/models
profiles:
- cpu
restart: unless-stopped
networks:
default:
name: quantizer-network