akashjayampu commited on
Commit
20dafbe
·
verified ·
1 Parent(s): e7b4ab2

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -10
Dockerfile CHANGED
@@ -1,24 +1,21 @@
1
- # Use minimal Python image
2
  FROM python:3.9-slim
3
 
4
- # Set Hugging Face cache dir (no future warning)
5
- ENV HF_HOME=/app/.cache/huggingface
6
-
7
- # Fix permissions
8
- RUN mkdir -p $HF_HOME && chmod -R 777 $HF_HOME
9
-
10
  # Set working directory
11
  WORKDIR /app
12
 
13
- # Install dependencies
 
 
 
 
14
  COPY requirements.txt .
15
  RUN pip install --no-cache-dir -r requirements.txt
16
 
17
- # Copy all code
18
  COPY . .
19
 
20
  # Expose Streamlit port
21
  EXPOSE 7860
22
 
23
- # Run app (model downloads will happen here, when HF_TOKEN is available)
24
  CMD ["streamlit", "run", "src/streamlit_app.py", "--server.port=7860", "--server.address=0.0.0.0"]
 
 
1
  FROM python:3.9-slim
2
 
 
 
 
 
 
 
3
  # Set working directory
4
  WORKDIR /app
5
 
6
+ # Prevent warnings
7
+ ENV HF_HOME=/app/.cache/huggingface
8
+ RUN mkdir -p $HF_HOME && chmod -R 777 $HF_HOME
9
+
10
+ # Install requirements
11
  COPY requirements.txt .
12
  RUN pip install --no-cache-dir -r requirements.txt
13
 
14
+ # Copy source code
15
  COPY . .
16
 
17
  # Expose Streamlit port
18
  EXPOSE 7860
19
 
20
+ # Start Streamlit app
21
  CMD ["streamlit", "run", "src/streamlit_app.py", "--server.port=7860", "--server.address=0.0.0.0"]