Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +16 -7
Dockerfile
CHANGED
|
@@ -1,11 +1,20 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
COPY requirements.txt .
|
|
|
|
|
|
|
| 5 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 6 |
-
|
|
|
|
| 7 |
COPY . .
|
| 8 |
-
|
| 9 |
-
|
| 10 |
EXPOSE 7860
|
| 11 |
-
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use official Python base image
|
| 2 |
+
FROM python:3.9-slim
|
| 3 |
+
|
| 4 |
+
# Set working directory inside the container
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# Copy requirements file
|
| 8 |
COPY requirements.txt .
|
| 9 |
+
|
| 10 |
+
# Install dependencies
|
| 11 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
+
|
| 13 |
+
# Copy the application code
|
| 14 |
COPY . .
|
| 15 |
+
|
| 16 |
+
# Expose the port (will be overridden by PORT environment variable if set)
|
| 17 |
EXPOSE 7860
|
| 18 |
+
|
| 19 |
+
# Command to run the Flask app
|
| 20 |
+
CMD ["python", "2api.py"]
|