services: ultralytics: image: ultralytics/ultralytics:latest container_name: ultralytics restart: unless-stopped command: - /bin/bash - -c - >- pip install 'streamlit>=1.29.0' -q --root-user-action=ignore && sed -i 's/cv2.destroyAllWindows()/pass/' /ultralytics/ultralytics/solutions/streamlit_inference.py && streamlit run /ultralytics/ultralytics/solutions/streamlit_inference.py --server.headless true --server.address 0.0.0.0 --server.port 8501 -- /data/models/yolo11x_leaf.pt ports: - "127.0.0.1:8501:8501" volumes: - /srv/ultralytics/data:/data - /srv/ultralytics/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: