Bentham commited on
Commit
58cd495
·
verified ·
1 Parent(s): 6293dbc

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -13
Dockerfile CHANGED
@@ -1,23 +1,21 @@
1
- # Use the official Python image with version 3.9
2
  FROM python:3.9-slim
3
 
4
- # Set the working directory in the container
5
- WORKDIR /app
6
 
7
- # Install Pandoc which is required by pypandoc
8
- RUN apt-get update && apt-get install -y pandoc && rm -rf /var/lib/apt/lists/*
9
 
10
- # Copy the requirements file
11
  COPY requirements.txt .
12
-
13
- # Install the Python dependencies
14
  RUN pip install --no-cache-dir -r requirements.txt
15
 
16
- # Copy the application code to the container
17
  COPY . .
18
 
19
- # Expose the port on which FastAPI will run
20
- EXPOSE 8000
21
 
22
- # Command to run the FastAPI application
23
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
 
1
+ # Utiliser l'image Python officielle
2
  FROM python:3.9-slim
3
 
4
+ # Installer pandoc
5
+ RUN apt-get update && apt-get install -y pandoc
6
 
7
+ # Définir le répertoire de travail
8
+ WORKDIR /app
9
 
10
+ # Copier le fichier requirements.txt et installer les dépendances
11
  COPY requirements.txt .
 
 
12
  RUN pip install --no-cache-dir -r requirements.txt
13
 
14
+ # Copier le code de l'application
15
  COPY . .
16
 
17
+ # Exposer le port 7860 attendu par Hugging Face Spaces
18
+ EXPOSE 7860
19
 
20
+ # Commande pour démarrer l'application, écouter sur le port 7860
21
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]