Learnerbegginer commited on
Commit
18fada9
·
verified ·
1 Parent(s): 4800377

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -9
Dockerfile CHANGED
@@ -3,21 +3,20 @@ FROM python:3.9-slim
3
  # Set working directory
4
  WORKDIR /app
5
 
6
- # Set HF model cache path to a writable directory
7
- ENV TRANSFORMERS_CACHE=/app/hf_cache
8
-
9
- # Create cache directory manually
10
- RUN mkdir -p /app/hf_cache
11
-
12
- # Copy requirements and install
13
  COPY requirements.txt .
14
  RUN pip install --no-cache-dir -r requirements.txt
15
 
16
- # Copy rest of the app files
 
 
 
 
 
17
  COPY . .
18
 
19
  # Expose port for Streamlit
20
  EXPOSE 7860
21
 
22
- # Command to run the app
23
  CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]
 
3
  # Set working directory
4
  WORKDIR /app
5
 
6
+ # Install dependencies
 
 
 
 
 
 
7
  COPY requirements.txt .
8
  RUN pip install --no-cache-dir -r requirements.txt
9
 
10
+ # Set writable cache directory
11
+ ENV TRANSFORMERS_CACHE=/app/cache
12
+ ENV HF_HOME=/app/cache
13
+ RUN mkdir -p /app/cache
14
+
15
+ # Copy all files
16
  COPY . .
17
 
18
  # Expose port for Streamlit
19
  EXPOSE 7860
20
 
21
+ # Run the app
22
  CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]