diff --git a/.github/workflows/gar-build-push-model-server-container-on-tag.yml b/.github/workflows/gar-build-push-model-server-container-on-tag.yml index 50792288b0d..d4788b25310 100644 --- a/.github/workflows/gar-build-push-model-server-container-on-tag.yml +++ b/.github/workflows/gar-build-push-model-server-container-on-tag.yml @@ -45,7 +45,7 @@ jobs: id: metadata with: images: | - us-docker.pkg.dev/${{ env.GarProjectID }}/${{ env.GarRepo }}/${{ env.GarImageName }}:${{ github.ref_name }} + us-docker.pkg.dev/${{ env.GarProjectID }}/${{ env.GarRepo }}/${{ env.GarImageName }}:${{ github.sha }} - name: Model Server Image Docker Build and Push uses: int128/kaniko-action@v1 @@ -60,7 +60,7 @@ jobs: --snapshot-mode=redo --cache-ttl=730h tags: | - us-docker.pkg.dev/${{ env.GarProjectID }}/${{ env.GarRepo }}/${{ env.GarImageName }}:${{ github.ref_name }} + us-docker.pkg.dev/${{ env.GarProjectID }}/${{ env.GarRepo }}/${{ env.GarImageName }}:${{ github.sha }} us-docker.pkg.dev/${{ env.GarProjectID }}/${{ env.GarRepo }}/${{ env.GarImageName }}:latest build-args: | - DANSWER_VERSION=${{ github.ref_name }} + DANSWER_VERSION=${{ github.sha }} diff --git a/backend/Dockerfile.model_server b/backend/Dockerfile.model_server index f2fb1ca44d0..c915dc688c4 100644 --- a/backend/Dockerfile.model_server +++ b/backend/Dockerfile.model_server @@ -21,19 +21,16 @@ 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('distilbert-base-uncased'); \ -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('nomic-ai/nomic-embed-text-v1'); \ -snapshot_download('mixedbread-ai/mxbai-rerank-xsmall-v1'); \ -from sentence_transformers import SentenceTransformer; \ -SentenceTransformer(model_name_or_path='nomic-ai/nomic-embed-text-v1', trust_remote_code=True);" +# RUN python -c "from transformers import AutoTokenizer; \ +# from huggingface_hub import snapshot_download; \ +# snapshot_download(repo_id='danswer/hybrid-intent-token-classifier', revision='v1.0.3'); \ +# snapshot_download('nomic-ai/nomic-embed-text-v1'); \ +# from sentence_transformers import SentenceTransformer; \ +# SentenceTransformer(model_name_or_path='nomic-ai/nomic-embed-text-v1', trust_remote_code=True);" # 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