learning4 commited on
Commit
d85123a
·
verified ·
1 Parent(s): ad59e52

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -17
Dockerfile CHANGED
@@ -1,17 +1,23 @@
1
- # Use an official Python runtime as a parent image
2
- FROM python:3.9-slim
3
-
4
- # Set the working directory
5
- WORKDIR /app
6
-
7
- # Copy the current directory contents into the container at /app
8
- COPY . /app
9
-
10
- # Install any needed packages specified in requirements.txt
11
- RUN pip install --no-cache-dir -r requirements.txt
12
-
13
- # Make port 8501 available to the world outside this container
14
- EXPOSE 8501
15
-
16
- # Run app.py when the container launches
17
- CMD ["python", "app.py"]
 
 
 
 
 
 
 
1
+ # Use a base image with Python
2
+ FROM python:3.9-slim
3
+
4
+ # Set the working directory
5
+ WORKDIR /app
6
+
7
+ # Upgrade pip to the latest version
8
+ RUN pip install --upgrade pip
9
+
10
+ # Copy the current directory contents into the container at /app
11
+ COPY . /app
12
+
13
+ # Install any needed packages specified in requirements.txt
14
+ RUN pip install --no-cache-dir -r requirements.txt
15
+
16
+ # Make port 5000 available to the world outside this container
17
+ EXPOSE 5000
18
+
19
+ # Define environment variable
20
+ ENV NAME World
21
+
22
+ # Run app.py when the container launches
23
+ CMD ["python", "app.py"]