tmt3103 commited on
Commit
5a5f157
·
1 Parent(s): 2b15014

update cache

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -2
Dockerfile CHANGED
@@ -3,11 +3,20 @@ FROM python:3.9-slim
3
  # Set working directory
4
  WORKDIR /app
5
 
6
- # Copy
7
  COPY requirements.txt setup.py ./
 
 
8
  RUN pip install --no-cache-dir -r requirements.txt
9
 
10
- # Copy
 
 
 
 
 
 
 
11
  COPY . .
12
 
13
  # Expose port
 
3
  # Set working directory
4
  WORKDIR /app
5
 
6
+ # Copy dependencies
7
  COPY requirements.txt setup.py ./
8
+
9
+ # dependencies
10
  RUN pip install --no-cache-dir -r requirements.txt
11
 
12
+ #
13
+ ENV TRANSFORMERS_CACHE=/app/.cache
14
+ ENV HF_HOME=/app/.cache
15
+
16
+ # Pre-download HuggingFace model
17
+ RUN python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')"
18
+
19
+ # Copy source code
20
  COPY . .
21
 
22
  # Expose port