prd101-wd commited on
Commit
de4e2ff
·
verified ·
1 Parent(s): 341c97f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -6
Dockerfile CHANGED
@@ -2,11 +2,11 @@
2
  FROM python:3.10-slim
3
 
4
  # Set environment variables to avoid caching issues with Hugging Face
5
- # ENV HF_HOME=/tmp/huggingface \
6
- # TRANSFORMERS_CACHE=/tmp/huggingface/transformers \
7
- # HF_DATASETS_CACHE=/tmp/huggingface/datasets \
8
- # HUGGINGFACE_HUB_CACHE=/tmp/huggingface/hub \
9
- # XDG_CACHE_HOME=/tmp/huggingface
10
 
11
  WORKDIR /app
12
 
@@ -20,7 +20,10 @@ WORKDIR /app
20
  COPY requirements.txt ./
21
  COPY src/ ./src/
22
 
23
- RUN pip install --no-cache-dir -r requirements.txt
 
 
 
24
 
25
  EXPOSE 7860
26
 
 
2
  FROM python:3.10-slim
3
 
4
  # Set environment variables to avoid caching issues with Hugging Face
5
+ ENV HF_HOME=/tmp/huggingface \
6
+ TRANSFORMERS_CACHE=/tmp/huggingface/transformers \
7
+ HF_DATASETS_CACHE=/tmp/huggingface/datasets \
8
+ HUGGINGFACE_HUB_CACHE=/tmp/huggingface/hub \
9
+ XDG_CACHE_HOME=/tmp/huggingface
10
 
11
  WORKDIR /app
12
 
 
20
  COPY requirements.txt ./
21
  COPY src/ ./src/
22
 
23
+ RUN pip install --no-cache-dir -r requirements.txt && \
24
+ python -c "from transformers import AutoTokenizer, AutoModel; \
25
+ AutoTokenizer.from_pretrained('prd101-wd/phi1_5-bankingqa-merged'); \
26
+ AutoModel.from_pretrained('prd101-wd/phi1_5-bankingqa-merged')"
27
 
28
  EXPOSE 7860
29