BramVanroy commited on
Commit
55eb099
1 Parent(s): 797f976

add pre-downloading

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -3
Dockerfile CHANGED
@@ -23,10 +23,11 @@ WORKDIR $HOME/mateo-demo
23
 
24
  RUN python -m pip install --no-cache-dir --upgrade pip && python -m pip install --no-cache-dir --upgrade .
25
 
26
- # Preload models
27
- RUN huggingface-cli download facebook/nllb-200-distilled-600M pytorch_model.bin sentencepiece.bpe.model tokenizer.json
28
- RUN huggingface-cli download Unbabel/wmt22-comet-da checkpoints/model.ckpt
29
  RUN huggingface-cli download bert-base-multilingual-cased model.safetensors tokenizer.json vocab.txt
 
30
 
31
  EXPOSE 7860
32
  HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health
 
23
 
24
  RUN python -m pip install --no-cache-dir --upgrade pip && python -m pip install --no-cache-dir --upgrade .
25
 
26
+ # Pre-download default models
27
+ RUN python -c "import comet; from comet import download_model; download_model('Unbabel/wmt22-comet-da')"
28
+ RUN python -c "import evaluate; evaluate.load('bleurt', 'BLEURT-20')"
29
  RUN huggingface-cli download bert-base-multilingual-cased model.safetensors tokenizer.json vocab.txt
30
+ RUN huggingface-cli download facebook/nllb-200-distilled-600M pytorch_model.bin sentencepiece.bpe.model tokenizer.json
31
 
32
  EXPOSE 7860
33
  HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health