Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +11 -12
Dockerfile
CHANGED
@@ -1,21 +1,20 @@
|
|
1 |
-
# Use an official Python runtime as base image
|
2 |
-
FROM python:3.
|
3 |
|
4 |
# Set the working directory
|
5 |
WORKDIR /app
|
6 |
|
7 |
-
# Copy the
|
8 |
-
COPY
|
9 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
10 |
|
11 |
-
#
|
12 |
-
|
13 |
|
14 |
# Expose the port Flask runs on
|
15 |
-
EXPOSE
|
16 |
|
17 |
-
#
|
18 |
-
ENV
|
19 |
|
20 |
-
# Run the
|
21 |
-
CMD ["python", "app.py"]
|
|
|
1 |
+
# Use an official Python runtime as a base 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
|
8 |
+
COPY . /app
|
|
|
9 |
|
10 |
+
# Install dependencies
|
11 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
12 |
|
13 |
# Expose the port Flask runs on
|
14 |
+
EXPOSE 8000
|
15 |
|
16 |
+
# Define environment variable
|
17 |
+
ENV FLASK_APP=app.py
|
18 |
|
19 |
+
# Run the Flask app
|
20 |
+
CMD ["python", "app.py"]
|