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

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -9
Dockerfile CHANGED
@@ -1,18 +1,17 @@
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"]
 
1
+ # Use the official Python image from the Docker Hub
2
+ FROM python:3.11-slim
3
 
4
+ # Set the working directory in the container
 
 
5
  WORKDIR /app
6
 
7
+ # Copy the requirements file into the container
8
  COPY requirements.txt .
9
 
10
+ # Install any needed packages specified in requirements.txt
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
+ # Copy the current directory contents into the container at /app
14
  COPY . .
15
 
16
+ # Run the application
17
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]