subhash33 commited on
Commit
affd814
·
verified ·
1 Parent(s): c4c166a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -2
Dockerfile CHANGED
@@ -1,10 +1,20 @@
1
  FROM python:3.10-slim
2
 
 
 
 
 
3
  WORKDIR /app
4
 
 
 
 
 
5
  COPY requirements.txt .
6
- RUN pip install --no-cache-dir -r requirements.txt
7
 
 
8
  COPY . .
9
 
10
- CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
 
1
  FROM python:3.10-slim
2
 
3
+ # Set environment variable for transformers cache
4
+ ENV TRANSFORMERS_CACHE=/app/.cache
5
+
6
+ # Create a working directory
7
  WORKDIR /app
8
 
9
+ # Create the cache directory and ensure it has proper permissions
10
+ RUN mkdir -p /app/.cache && chmod -R 777 /app/.cache
11
+
12
+ # Copy the requirements file and install dependencies
13
  COPY requirements.txt .
14
+ RUN pip install --no-cache-dir -r requirements.txt
15
 
16
+ # Copy the rest of the application
17
  COPY . .
18
 
19
+ # Command to run the Streamlit app
20
+ CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]