Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +16 -6
Dockerfile
CHANGED
|
@@ -1,10 +1,20 @@
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
WORKDIR /app
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
COPY
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
EXPOSE 7860
|
| 8 |
ENV PORT=7860
|
| 9 |
-
|
| 10 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
WORKDIR /app
|
| 3 |
+
|
| 4 |
+
# Copy first so requirement changes always invalidate the layer
|
| 5 |
+
COPY requirements.txt /app/requirements.txt
|
| 6 |
+
RUN pip install --upgrade pip && pip install --no-cache-dir -r /app/requirements.txt
|
| 7 |
+
|
| 8 |
+
# Now copy model and code
|
| 9 |
+
COPY Random_Forest_pipeline_for_hf.joblib /app/model.joblib
|
| 10 |
+
COPY app.py /app/
|
| 11 |
+
|
| 12 |
EXPOSE 7860
|
| 13 |
ENV PORT=7860
|
| 14 |
+
|
| 15 |
+
# Different CMD line also invalidates the cache
|
| 16 |
+
CMD ["python", "app.py"]
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
|