| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- version: '3.8'
- services:
- livetalking:
- build:
- context: .
- dockerfile: Dockerfile
- image: livetalking:latest
- container_name: livetalking
- ports:
- - "7860:7860"
- - "8080:8080"
- volumes:
- - ./models:/app/models
- - ./data:/app/data
- - ./LivePortrait-main/pretrained_weights:/app/LivePortrait-main/pretrained_weights
- environment:
- - CUDA_VISIBLE_DEVICES=0
- - PYTORCH_CUDA_ALLOC_CONF=max_split_size_mb:512
- deploy:
- resources:
- reservations:
- devices:
- - driver: nvidia
- count: 1
- capabilities: [gpu]
- restart: unless-stopped
- networks:
- - livetalking-network
- # 可选:nginx反向代理
- nginx:
- image: nginx:latest
- container_name: livetalking-nginx
- ports:
- - "80:80"
- - "443:443"
- volumes:
- - ./nginx.conf:/etc/nginx/nginx.conf:ro
- depends_on:
- - livetalking
- restart: unless-stopped
- networks:
- - livetalking-network
- networks:
- livetalking-network:
- driver: bridge
|