a1c00l commited on
Commit
0b960c9
·
verified ·
1 Parent(s): 4dab6d1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -0
Dockerfile CHANGED
@@ -2,6 +2,11 @@ FROM python:3.10-slim
2
 
3
  WORKDIR /app
4
 
 
 
 
 
 
5
  # Install dependencies
6
  COPY requirements.txt .
7
  RUN pip install --no-cache-dir -r requirements.txt
 
2
 
3
  WORKDIR /app
4
 
5
+ # This ensures models are cached properly and don’t re-download every time
6
+ RUN mkdir /.cache && chmod 777 /.cache
7
+ ENV TRANSFORMERS_CACHE=/.cache
8
+ ENV HF_HOME=/.cache
9
+
10
  # Install dependencies
11
  COPY requirements.txt .
12
  RUN pip install --no-cache-dir -r requirements.txt