Spaces:
Sleeping
Sleeping
Create Dockerfile
Browse files- Dockerfile +19 -0
Dockerfile
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use a base Python image
|
| 2 |
+
FROM python:3.11-slim-buster
|
| 3 |
+
|
| 4 |
+
# Set the working directory in the container
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# Copy requirements.txt and install dependencies
|
| 8 |
+
COPY requirements.txt .
|
| 9 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 10 |
+
|
| 11 |
+
# Copy the rest of your application code
|
| 12 |
+
COPY . .
|
| 13 |
+
|
| 14 |
+
# Expose the port your Flask app will run on
|
| 15 |
+
EXPOSE 7860
|
| 16 |
+
|
| 17 |
+
# Command to run your Flask application with Gunicorn
|
| 18 |
+
# Assuming your Flask app instance is named 'app' in app.py
|
| 19 |
+
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]
|