thecoderhere commited on
Commit
30113b5
·
verified ·
1 Parent(s): d4db33a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -0
Dockerfile CHANGED
@@ -2,6 +2,15 @@ FROM python:3.9
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
+ # Create a writable cache directory
6
+ RUN mkdir -p /app/.cache && chmod 777 /app/.cache
7
+
8
+ # Set environment variables for cache
9
+ ENV HF_HOME=/app/.cache
10
+ ENV TRANSFORMERS_CACHE=/app/.cache/transformers
11
+ ENV SENTENCE_TRANSFORMERS_HOME=/app/.cache/sentence_transformers
12
+ ENV TORCH_HOME=/app/.cache/torch
13
+
14
  # Install dependencies
15
  COPY requirements.txt .
16
  RUN pip install --no-cache-dir -r requirements.txt