waste-classifier / docker-compose.yml
360TechEnv's picture
Upload docker-compose.yml with huggingface_hub
2df62d9 verified
raw
history blame contribute delete
874 Bytes
version: '3.8'
services:
waste-classifier:
build:
context: .
dockerfile: Dockerfile
container_name: waste-classifier-app
ports:
- "8501:8501"
volumes:
# Volume pour persister les modèles téléchargés
- model_cache:/app/models
# Volume pour les logs (optionnel)
- ./logs:/app/logs
environment:
- STREAMLIT_SERVER_PORT=8501
- STREAMLIT_SERVER_ADDRESS=0.0.0.0
- STREAMLIT_SERVER_HEADLESS=true
- STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8501/_stcore/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
networks:
- waste-classifier-network
volumes:
model_cache:
driver: local
networks:
waste-classifier-network:
driver: bridge