ex510 commited on
Commit
bcee2f5
·
verified ·
1 Parent(s): b461a54

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -10
Dockerfile CHANGED
@@ -1,17 +1,18 @@
1
- # Use the official Python 3.11 image
2
- FROM python:3.11
 
3
 
4
  # Set the working directory
5
  WORKDIR /app
6
 
7
- # Install FastAPI and Uvicorn
8
- RUN pip install fastapi uvicorn
9
 
10
- # Copy the current directory contents into the container at /app
11
- COPY . /app
12
 
13
- # Expose the port for the application
14
- EXPOSE 8080
15
 
16
- # Command to run the FastAPI app
17
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080"]
 
1
+ # Dockerfile
2
+
3
+ FROM python:3.9
4
 
5
  # Set the working directory
6
  WORKDIR /app
7
 
8
+ # Copy the requirements.txt file
9
+ COPY requirements.txt .
10
 
11
+ # Install the requirements
12
+ RUN pip install --no-cache-dir -r requirements.txt
13
 
14
+ # Copy the rest of the application code
15
+ COPY . .
16
 
17
+ # Command to run the application
18
+ CMD ["uvicorn", "your_module_name:app", "--host", "0.0.0.0", "--port", "7860"]