kritish205 commited on
Commit
7bf41df
·
verified ·
1 Parent(s): 571975a

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. Dockerfile +17 -5
  2. requirements.txt +1 -1
Dockerfile CHANGED
@@ -1,8 +1,20 @@
1
- FROM python:3.9
 
 
2
  WORKDIR /code
3
- COPY requirements.txt /code/requirements.txt
4
- RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
5
- COPY . /code
6
- # Expose port 7860 (required for Hugging Face Spaces)
 
 
 
 
 
 
 
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
- gradio
 
2
  joblib
3
  scikit-learn
4
  huggingface_hub
5
+ streamlit