Spaces:
Sleeping
Sleeping
Update dockerfile
Browse files- dockerfile +8 -8
dockerfile
CHANGED
|
@@ -1,21 +1,21 @@
|
|
| 1 |
-
# Use official Python
|
| 2 |
FROM python:3.9
|
| 3 |
|
| 4 |
-
# Set the working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
# Copy application files
|
| 8 |
COPY . .
|
| 9 |
|
| 10 |
-
# Install required
|
| 11 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
|
| 13 |
-
# Expose the
|
| 14 |
EXPOSE 7860
|
| 15 |
|
| 16 |
-
# Set environment variables
|
| 17 |
ENV FLASK_APP=app.py
|
| 18 |
ENV FLASK_RUN_HOST=0.0.0.0
|
| 19 |
|
| 20 |
-
#
|
| 21 |
-
CMD ["flask", "run", "--host=0.0.0.0", "--port=7860"]
|
|
|
|
| 1 |
+
# Use the official Python image
|
| 2 |
FROM python:3.9
|
| 3 |
|
| 4 |
+
# Set the working directory inside the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Copy application files
|
| 8 |
COPY . .
|
| 9 |
|
| 10 |
+
# Install required dependencies
|
| 11 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
|
| 13 |
+
# Expose the correct port for Hugging Face Spaces
|
| 14 |
EXPOSE 7860
|
| 15 |
|
| 16 |
+
# Set Flask environment variables
|
| 17 |
ENV FLASK_APP=app.py
|
| 18 |
ENV FLASK_RUN_HOST=0.0.0.0
|
| 19 |
|
| 20 |
+
# Run the Flask application on port 7860
|
| 21 |
+
CMD ["flask", "run", "--host=0.0.0.0", "--port=7860"]
|