28 lines
789 B
YAML
28 lines
789 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
background-remover:
|
|
build: .
|
|
container_name: background-remover-service
|
|
ports:
|
|
- "8000:8000"
|
|
volumes:
|
|
# Mount the models folder so it doesn't download the model every time the container is recreated
|
|
- u2net_models:/root/.u2net
|
|
# Mount for local development if needed
|
|
- .:/app
|
|
# Video processing uses multiprocessing and requires shared memory
|
|
shm_size: '2g'
|
|
restart: unless-stopped
|
|
# If a GPU becomes available, you would uncomment the following lines (and ensure the Dockerfile uses a CUDA base image)
|
|
# deploy:
|
|
# resources:
|
|
# reservations:
|
|
# devices:
|
|
# - driver: nvidia
|
|
# count: 1
|
|
# capabilities: [gpu]
|
|
|
|
volumes:
|
|
u2net_models:
|