3eeaa8ff6d
streamlit-predict was removed in newer ultralytics; yolo solutions inference is the current equivalent. Installs streamlit on startup via pip cache volume.
34 lines
827 B
YAML
34 lines
827 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' -q --root-user-action=ignore && 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:
|