doctorx commited on
Commit
19c75c4
β€’
1 Parent(s): e613a30

Upload Dockerfile

Browse files

Download model when build Docker

Files changed (1) hide show
  1. Dockerfile +4 -4
Dockerfile CHANGED
@@ -36,10 +36,10 @@ COPY . /app
36
  RUN pip install git+https://github.com/huggingface/transformers.git
37
  # Debug the transformers package and download the model
38
  #RUN python -c "import transformers; print(transformers.__version__); print(dir(transformers))"
39
- #RUN python -c "from transformers import AutoProcessor, AutoModel; \
40
- # model_name = 'facebook/seamless-m4t-v2-large'; \
41
- # AutoProcessor.from_pretrained(model_name); \
42
- # AutoModel.from_pretrained(model_name)"
43
 
44
  # Expose the port
45
  EXPOSE 8080
 
36
  RUN pip install git+https://github.com/huggingface/transformers.git
37
  # Debug the transformers package and download the model
38
  #RUN python -c "import transformers; print(transformers.__version__); print(dir(transformers))"
39
+ RUN python -c "from transformers import AutoProcessor, SeamlessM4Tv2Model; \
40
+ model_name = 'facebook/seamless-m4t-v2-large'; \
41
+ AutoProcessor.from_pretrained(model_name); \
42
+ SeamlessM4Tv2Model.from_pretrained(model_name)"
43
 
44
  # Expose the port
45
  EXPOSE 8080