idkash1 commited on
Commit
32bfdb7
·
verified ·
1 Parent(s): 14b0000

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -1
Dockerfile CHANGED
@@ -12,7 +12,7 @@ RUN mkdir -p /cache/huggingface /cache/matplotlib \
12
  && chmod -R 777 /cache/huggingface /cache/matplotlib
13
 
14
  # Set environment variables for Hugging Face and Matplotlib
15
- ENV HF_HOME=/cache/huggingfacec
16
  ENV MPLCONFIGDIR=/cache/matplotlib
17
 
18
  # Flask
@@ -21,6 +21,8 @@ ENV FLASK_APP=app.py
21
  # Install dependencies
22
  RUN pip install --no-cache-dir -r requirements.txt
23
 
 
 
24
  # Copy the rest of the app
25
  COPY . .
26
 
 
12
  && chmod -R 777 /cache/huggingface /cache/matplotlib
13
 
14
  # Set environment variables for Hugging Face and Matplotlib
15
+ ENV HF_HOME=/cache/huggingface
16
  ENV MPLCONFIGDIR=/cache/matplotlib
17
 
18
  # Flask
 
21
  # Install dependencies
22
  RUN pip install --no-cache-dir -r requirements.txt
23
 
24
+ RUN "from transformers import AutoModelForCausalLM, AutoTokenizer; AutoModelForCausalLM.from_pretrained('gpt2-xl', cache_dir='/cache/huggingface'); AutoTokenizer.from_pretrained('gpt2-xl', cache_dir='/cache/huggingface')"
25
+
26
  # Copy the rest of the app
27
  COPY . .
28