Skip to content

Commit

Permalink
Add logging for Model Download
Browse files Browse the repository at this point in the history
Bug with downloading to existing folder
  • Loading branch information
voatsap authored May 6, 2024
1 parent 3d51626 commit 3e50527
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions huggingface-model/templates/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,19 @@ spec:
- |
set -x
if [ -f "/usr/src/{{ .Values.model.name }}/config.json" ]; then echo "Model {{ .Values.model.name }} is already downloaded. Skipping init..."; exit 0; fi
echo "Files present before init:"
ls -al /usr/src/{{ .Values.model.name }} # Add this line to check directory contents
rm -rf /usr/src/{{ .Values.model.name }}/*
rm -rf /usr/src/{{ .Values.model.name }}/.*
echo "Files present after cleaning the path:"
ls -al /usr/src/{{ .Values.model.name }}
{{- if and .Values.init.s3.enabled }}
apk add --update aws-cli
aws s3 cp --recursive {{ .Values.init.s3.bucketURL }} /usr/src/{{ .Values.model.name }}
{{- else }}
apk add --update git-lfs
git clone --progress --depth=1 https://{{ if and .Values.model.hf_user .Values.model.hf_token }}{{ .Values.model.hf_user }}:{{ .Values.model.hf_token }}@{{ end }}huggingface.co/{{ .Values.model.organization }}/{{ .Values.model.name }} /usr/src/{{ .Values.model.name }}
echo "Cloning Successfully Finished. May start Main container"
{{- end }}
volumeMounts:
- name: model-storage
Expand Down

0 comments on commit 3e50527

Please sign in to comment.