Files
docker-infrastructure/leafweb-vision/docker-compose.yml
T
poprhythm eebb5d11d0 Fix leafweb-vision OpenCV headless error on cv2.destroyAllWindows
Replace opencv-python with opencv-python-headless so GUI calls are
no-ops instead of crashing in a display-less container.
2026-02-21 19:49:00 +00:00

34 lines
897 B
YAML

services:
leafweb-vision:
image: ultralytics/ultralytics:latest
container_name: leafweb-vision
restart: unless-stopped
command: bash -c "pip install 'streamlit>=1.29.0' opencv-python-headless -q --root-user-action=ignore && pip uninstall opencv-python -y -q 2>/dev/null; yolo solutions inference"
ports:
- "8501:8501"
volumes:
- /srv/leafweb-vision/data:/data
- /srv/leafweb-vision/runs:/root/runs
- pip_cache:/root/.cache/pip
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
environment:
- TZ=America/New_York
- STREAMLIT_SERVER_ADDRESS=0.0.0.0
- STREAMLIT_SERVER_PORT=8501
- STREAMLIT_SERVER_HEADLESS=true
networks:
- npm-network
networks:
npm-network:
external: true
volumes:
pip_cache: