Update Dockerfile
Browse files- Dockerfile +7 -4
Dockerfile
CHANGED
|
@@ -1,16 +1,19 @@
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
-
# Installer dépendances système (
|
| 4 |
RUN apt-get update && apt-get install -y git
|
| 5 |
|
| 6 |
-
#
|
| 7 |
WORKDIR /app
|
| 8 |
|
| 9 |
-
#
|
|
|
|
|
|
|
|
|
|
| 10 |
COPY . .
|
| 11 |
|
| 12 |
# Installer les dépendances Python
|
| 13 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 14 |
|
| 15 |
-
# Lancer
|
| 16 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
+
# Installer dépendances système (optionnel)
|
| 4 |
RUN apt-get update && apt-get install -y git
|
| 5 |
|
| 6 |
+
# Définir le dossier de travail
|
| 7 |
WORKDIR /app
|
| 8 |
|
| 9 |
+
# Créer le dossier de cache DANS /app et donner les permissions
|
| 10 |
+
RUN mkdir -p cache && chmod -R 777 cache
|
| 11 |
+
|
| 12 |
+
# Copier les fichiers dans le container
|
| 13 |
COPY . .
|
| 14 |
|
| 15 |
# Installer les dépendances Python
|
| 16 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 17 |
|
| 18 |
+
# Lancer le serveur FastAPI
|
| 19 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|