Files
docker-infrastructure/ultralytics/docker-compose.yml
T
poprhythm 9f98a4081e Add Authelia SSO, remove authentik, restrict ultralytics port
- Add authelia/ stack: Authelia 4.38 + Redis 7-alpine on isolated
  authelia-internal bridge; Authelia also on npm-network for NPM
  forward-auth. Secrets via env vars (not committed).
- Add authelia/config/configuration.yaml: file-based users, SQLite
  storage, one_factor policy for *.kolpacksoftware.com
- Add **/users_database.yaml to .gitignore (host-only secret)
- Remove authentik/ (non-functional leftover)
- ultralytics: bind port 8501 to 127.0.0.1 only (auth enforced via NPM)
2026-02-22 20:21:11 +00:00

42 lines
1.1 KiB
YAML

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: