Skip to content

Commit

Permalink
Merge pull request #58 from mindvalley/chore/disable-pre-download-models
Browse files Browse the repository at this point in the history
Disable pre-downloading models
  • Loading branch information
onimsha authored Sep 18, 2024
2 parents d30294b + c6df1cc commit 9f5de3b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions backend/Dockerfile.model_server
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ RUN apt-get remove -y --allow-remove-essential perl-base && \
# Download tokenizers, distilbert for the Danswer model
# Download model weights
# Run Nomic to pull in the custom architecture and have it cached locally
RUN python -c "from transformers import AutoTokenizer; \
AutoTokenizer.from_pretrained('mixedbread-ai/mxbai-rerank-xsmall-v1'); \
from huggingface_hub import snapshot_download; \
snapshot_download(repo_id='danswer/hybrid-intent-token-classifier', revision='v1.0.3'); \
snapshot_download('mixedbread-ai/mxbai-rerank-xsmall-v1');"
# RUN python -c "from transformers import AutoTokenizer; \
# AutoTokenizer.from_pretrained('mixedbread-ai/mxbai-rerank-xsmall-v1'); \
# from huggingface_hub import snapshot_download; \
# snapshot_download(repo_id='danswer/hybrid-intent-token-classifier', revision='v1.0.3'); \
# snapshot_download('mixedbread-ai/mxbai-rerank-xsmall-v1');"

# In case the user has volumes mounted to /root/.cache/huggingface that they've downloaded while
# running Danswer, don't overwrite it with the built in cache folder
RUN mv /root/.cache/huggingface /root/.cache/temp_huggingface
# RUN mv /root/.cache/huggingface /root/.cache/temp_huggingface

WORKDIR /app

Expand Down

0 comments on commit 9f5de3b

Please sign in to comment.