File size: 874 Bytes
2df62d9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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