Files
Myolotrain/docker-compose-gpu.yml
2025-04-21 11:18:14 +08:00

43 lines
857 B
YAML

version: '3'
services:
db:
image: postgres:13
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: yolov8_platform
volumes:
- postgres_data:/var/lib/postgresql/data
restart: always
web:
build:
context: .
dockerfile: Dockerfile.gpu
ports:
- "8000:8000"
- "6006:6006"
depends_on:
- db
environment:
- POSTGRES_SERVER=db
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=yolov8_platform
- NVIDIA_VISIBLE_DEVICES=all
volumes:
- ./app/static:/app/app/static
- ./logs:/app/logs
restart: always
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
volumes:
postgres_data: