darkstorm2150 commited on
Commit
2cf4319
·
verified ·
1 Parent(s): a8e560a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -0
Dockerfile CHANGED
@@ -14,6 +14,17 @@ WORKDIR /content
14
  USER user
15
 
16
  RUN pip3 install --upgrade pip
 
 
 
 
 
 
 
 
 
 
 
17
  RUN pip install torchmetrics==0.11.4
18
  RUN pip install https://github.com/camenduru/stable-diffusion-webui-colab/releases/download/0.0.16/xformers-0.0.16+814314d.d20230119.A10G-cp310-cp310-linux_x86_64.whl
19
  RUN pip install --pre triton
 
14
  USER user
15
 
16
  RUN pip3 install --upgrade pip
17
+
18
+ # Add Hugging Face cache setup
19
+ ENV HF_HOME=/content/huggingface
20
+ ENV TRANSFORMERS_CACHE=$HF_HOME
21
+ RUN mkdir -p $HF_HOME
22
+
23
+ # Install transformers and download tokenizer
24
+ RUN pip3 install --upgrade pip
25
+ RUN pip install transformers==4.26.1
26
+ RUN python -c "from transformers import CLIPTokenizer; CLIPTokenizer.from_pretrained('openai/clip-vit-large-patch14')"
27
+
28
  RUN pip install torchmetrics==0.11.4
29
  RUN pip install https://github.com/camenduru/stable-diffusion-webui-colab/releases/download/0.0.16/xformers-0.0.16+814314d.d20230119.A10G-cp310-cp310-linux_x86_64.whl
30
  RUN pip install --pre triton