Aayan873 commited on
Commit
390afbc
·
verified ·
1 Parent(s): 3a6a081

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -1
Dockerfile CHANGED
@@ -20,7 +20,16 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
20
  COPY requirements.txt /app/requirements.txt
21
  RUN python -m pip install --upgrade pip setuptools wheel && \
22
  pip install --no-cache-dir -r requirements.txt
23
-
 
 
 
 
 
 
 
 
 
24
  COPY . /app
25
  EXPOSE 7860
26
  HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health || exit 1
 
20
  COPY requirements.txt /app/requirements.txt
21
  RUN python -m pip install --upgrade pip setuptools wheel && \
22
  pip install --no-cache-dir -r requirements.txt
23
+ RUN mkdir -p /app/.cache/huggingface /app/.cache/torch /tmp/hf && \
24
+ chmod -R 777 /app/.cache /tmp/hf
25
+ ENV HF_HOME=/app/.cache/huggingface \
26
+ TRANSFORMERS_CACHE=/app/.cache/huggingface \
27
+ HUGGINGFACE_HUB_CACHE=/app/.cache/huggingface \
28
+ HF_DATASETS_CACHE=/app/.cache/huggingface \
29
+ SENTENCE_TRANSFORMERS_HOME=/app/.cache/huggingface \
30
+ XDG_CACHE_HOME=/app/.cache \
31
+ TORCH_HOME=/app/.cache/torch \
32
+ TOKENIZERS_PARALLELISM=false
33
  COPY . /app
34
  EXPOSE 7860
35
  HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health || exit 1