Spaces:
Build error
Build error
Update dockerfile
Browse files- dockerfile +6 -4
dockerfile
CHANGED
|
@@ -1,15 +1,17 @@
|
|
| 1 |
-
|
|
|
|
| 2 |
|
|
|
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
# Copy requirements file
|
| 6 |
COPY requirements.txt .
|
| 7 |
|
| 8 |
# Install dependencies
|
| 9 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 10 |
|
| 11 |
-
# Copy rest of the
|
| 12 |
COPY . .
|
| 13 |
|
| 14 |
-
# Command to run the
|
| 15 |
CMD ["python", "app.py"]
|
|
|
|
| 1 |
+
# Start with a supported Python version
|
| 2 |
+
FROM python:3.9-slim
|
| 3 |
|
| 4 |
+
# Set the working directory inside the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Copy the requirements.txt file
|
| 8 |
COPY requirements.txt .
|
| 9 |
|
| 10 |
# Install dependencies
|
| 11 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
|
| 13 |
+
# Copy the rest of the code to the container
|
| 14 |
COPY . .
|
| 15 |
|
| 16 |
+
# Command to run the app (adjust the filename if needed)
|
| 17 |
CMD ["python", "app.py"]
|