360TechEnv commited on
Commit
2df62d9
·
verified ·
1 Parent(s): 1c72f70

Upload docker-compose.yml with huggingface_hub

Browse files
Files changed (1) hide show
  1. docker-compose.yml +37 -0
docker-compose.yml ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ version: '3.8'
2
+
3
+ services:
4
+ waste-classifier:
5
+ build:
6
+ context: .
7
+ dockerfile: Dockerfile
8
+ container_name: waste-classifier-app
9
+ ports:
10
+ - "8501:8501"
11
+ volumes:
12
+ # Volume pour persister les modèles téléchargés
13
+ - model_cache:/app/models
14
+ # Volume pour les logs (optionnel)
15
+ - ./logs:/app/logs
16
+ environment:
17
+ - STREAMLIT_SERVER_PORT=8501
18
+ - STREAMLIT_SERVER_ADDRESS=0.0.0.0
19
+ - STREAMLIT_SERVER_HEADLESS=true
20
+ - STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
21
+ restart: unless-stopped
22
+ healthcheck:
23
+ test: ["CMD", "curl", "-f", "http://localhost:8501/_stcore/health"]
24
+ interval: 30s
25
+ timeout: 10s
26
+ retries: 3
27
+ start_period: 40s
28
+ networks:
29
+ - waste-classifier-network
30
+
31
+ volumes:
32
+ model_cache:
33
+ driver: local
34
+
35
+ networks:
36
+ waste-classifier-network:
37
+ driver: bridge