Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +9 -4
Dockerfile
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
|
|
|
|
| 6 |
|
|
|
|
| 7 |
RUN pip install --upgrade pip setuptools wheel
|
| 8 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 9 |
|
| 10 |
-
|
|
|
|
| 11 |
|
| 12 |
-
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use Python 3.10 slim as base image
|
| 2 |
FROM python:3.10-slim
|
| 3 |
|
| 4 |
WORKDIR /app
|
| 5 |
|
| 6 |
+
# Copy your app code and requirements
|
| 7 |
+
COPY . /app
|
| 8 |
|
| 9 |
+
# Upgrade pip and install pre-built wheels
|
| 10 |
RUN pip install --upgrade pip setuptools wheel
|
|
|
|
| 11 |
|
| 12 |
+
# Install dependencies with --prefer-binary to avoid build issues
|
| 13 |
+
RUN pip install --prefer-binary numpy==1.24.3 scikit-learn==1.7.1 pandas==2.3.2 joblib==1.2.0 Flask==2.3.3 gunicorn==21.2.0
|
| 14 |
|
| 15 |
+
# Expose port and run the app
|
| 16 |
+
EXPOSE 5000
|
| 17 |
+
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "app:app"]
|