Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable pre-downloading models #58

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading