Stroke-ia commited on
Commit
d68aaf3
·
verified ·
1 Parent(s): 0838584

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -4
Dockerfile CHANGED
@@ -2,15 +2,18 @@ FROM python:3.9
2
 
3
  WORKDIR /code
4
 
5
- # Install dependencies
 
 
 
6
  COPY requirements.txt .
7
  RUN pip install --no-cache-dir -r requirements.txt
8
 
9
- # Copy API
10
  COPY api.py .
11
 
12
- # Expose port
13
  EXPOSE 7860
14
 
15
- # Run FastAPI with uvicorn
16
  CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "7860"]
 
2
 
3
  WORKDIR /code
4
 
5
+ # Installer dépendances système nécessaires pour OpenCV
6
+ RUN apt-get update && apt-get install -y libgl1 libglib2.0-0 && rm -rf /var/lib/apt/lists/*
7
+
8
+ # Installer dépendances Python
9
  COPY requirements.txt .
10
  RUN pip install --no-cache-dir -r requirements.txt
11
 
12
+ # Copier ton API
13
  COPY api.py .
14
 
15
+ # Exposer le port utilisé par Hugging Face
16
  EXPOSE 7860
17
 
18
+ # Lancer FastAPI avec uvicorn
19
  CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "7860"]