Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- Dockerfile +17 -5
- requirements.txt +1 -1
Dockerfile
CHANGED
|
@@ -1,8 +1,20 @@
|
|
| 1 |
-
FROM python:3.9
|
|
|
|
|
|
|
| 2 |
WORKDIR /code
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
COPY .
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
EXPOSE 7860
|
|
|
|
|
|
|
|
|
|
| 8 |
CMD ["streamlit", "run", "app.py", "--server.port", "7860", "--server.address", "0.0.0.0"]
|
|
|
|
| 1 |
+
FROM python:3.9-slim
|
| 2 |
+
|
| 3 |
+
# Set the working directory
|
| 4 |
WORKDIR /code
|
| 5 |
+
|
| 6 |
+
# Copy requirements first to leverage Docker cache
|
| 7 |
+
COPY requirements.txt .
|
| 8 |
+
|
| 9 |
+
# Install dependencies
|
| 10 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 11 |
+
|
| 12 |
+
# Copy the rest of the application
|
| 13 |
+
COPY . .
|
| 14 |
+
|
| 15 |
+
# Expose the port Hugging Face expects
|
| 16 |
EXPOSE 7860
|
| 17 |
+
|
| 18 |
+
# Force the full path to streamlit if necessary,
|
| 19 |
+
# but usually 'streamlit run' works if installed correctly
|
| 20 |
CMD ["streamlit", "run", "app.py", "--server.port", "7860", "--server.address", "0.0.0.0"]
|
requirements.txt
CHANGED
|
@@ -2,4 +2,4 @@ pandas
|
|
| 2 |
joblib
|
| 3 |
scikit-learn
|
| 4 |
huggingface_hub
|
| 5 |
-
|
|
|
|
| 2 |
joblib
|
| 3 |
scikit-learn
|
| 4 |
huggingface_hub
|
| 5 |
+
streamlit
|