Upload Dockerfile.txt
Browse files- Dockerfile.txt +19 -0
Dockerfile.txt
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This is Dockerfile in root directory Use an official Python runtime as a parent image
|
| 2 |
+
FROM python:3.9-slim-buster
|
| 3 |
+
|
| 4 |
+
# Set the working directory in the container to /app
|
| 5 |
+
# All subsequent commands will be run relative to /app
|
| 6 |
+
WORKDIR /app
|
| 7 |
+
|
| 8 |
+
# Copy all files from your Space's root into the container's /app
|
| 9 |
+
COPY . /app
|
| 10 |
+
|
| 11 |
+
# Install any needed packages specified in requirements.txt
|
| 12 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 13 |
+
|
| 14 |
+
# Make port 7860 available to the world outside this container
|
| 15 |
+
EXPOSE 7860
|
| 16 |
+
|
| 17 |
+
# Command to run the Flask application
|
| 18 |
+
# Now that app.py is in src/, we need to specify its path relative to WORKDIR /app
|
| 19 |
+
CMD ["python", "src/app.py"]
|