Update Dockerfile
Browse files- Dockerfile +10 -5
Dockerfile
CHANGED
|
@@ -1,16 +1,21 @@
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
|
|
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
#
|
| 6 |
COPY requirements.txt .
|
|
|
|
|
|
|
| 7 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 8 |
|
| 9 |
-
# Copy
|
| 10 |
-
COPY
|
| 11 |
|
| 12 |
-
# Expose
|
| 13 |
EXPOSE 7860
|
| 14 |
|
| 15 |
-
|
|
|
|
|
|
|
| 16 |
CMD ["python", "app.py"]
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
+
# Set working directory
|
| 4 |
WORKDIR /app
|
| 5 |
|
| 6 |
+
# Copy requirements first (better caching)
|
| 7 |
COPY requirements.txt .
|
| 8 |
+
|
| 9 |
+
# Install Python dependencies
|
| 10 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 11 |
|
| 12 |
+
# Copy all application files
|
| 13 |
+
COPY . .
|
| 14 |
|
| 15 |
+
# Expose Flask port
|
| 16 |
EXPOSE 7860
|
| 17 |
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
# Run the application
|
| 21 |
CMD ["python", "app.py"]
|