mirror of
https://gitee.com/rock_kim/Myolotrain.git
synced 2025-12-06 11:39:07 +08:00
43 lines
857 B
YAML
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:
|