diff --git a/download.sh b/download.sh index 9ba1b533c..c306c498a 100755 --- a/download.sh +++ b/download.sh @@ -16,18 +16,18 @@ if [[ $MODEL_SIZE == "" ]]; then fi echo "Downloading LICENSE and Acceptable Usage Policy" -wget --continue ${PRESIGNED_URL/'*'/"LICENSE"} -O ${TARGET_FOLDER}"/LICENSE" -wget --continue ${PRESIGNED_URL/'*'/"USE_POLICY.md"} -O ${TARGET_FOLDER}"/USE_POLICY.md" +wget --continue ${PRESIGNED_URL/'*'/"LICENSE"} -O ${TARGET_FOLDER}/LICENSE +wget --continue ${PRESIGNED_URL/'*'/"USE_POLICY.md"} -O ${TARGET_FOLDER}/USE_POLICY.md echo "Downloading tokenizer" -wget --continue ${PRESIGNED_URL/'*'/"tokenizer.model"} -O ${TARGET_FOLDER}"/tokenizer.model" -wget --continue ${PRESIGNED_URL/'*'/"tokenizer_checklist.chk"} -O ${TARGET_FOLDER}"/tokenizer_checklist.chk" +wget --continue ${PRESIGNED_URL/'*'/"tokenizer.model"} -O ${TARGET_FOLDER}/tokenizer.model +wget --continue ${PRESIGNED_URL/'*'/"tokenizer_checklist.chk"} -O ${TARGET_FOLDER}/tokenizer_checklist.chk CPU_ARCH=$(uname -m) - if [ "$CPU_ARCH" = "arm64" ]; then +if [ "$CPU_ARCH" = "arm64" ]; then (cd ${TARGET_FOLDER} && md5 tokenizer_checklist.chk) - else +else (cd ${TARGET_FOLDER} && md5sum -c tokenizer_checklist.chk) - fi +fi for m in ${MODEL_SIZE//,/ } do @@ -52,19 +52,19 @@ do fi echo "Downloading ${MODEL_PATH}" - mkdir -p ${TARGET_FOLDER}"/${MODEL_PATH}" + mkdir -p ${TARGET_FOLDER}/${MODEL_PATH} - for s in $(seq -f "0%g" 0 ${SHARD}) + for s in $(seq -f "%02g" 0 ${SHARD}) do - wget --continue ${PRESIGNED_URL/'*'/"${MODEL_PATH}/consolidated.${s}.pth"} -O ${TARGET_FOLDER}"/${MODEL_PATH}/consolidated.${s}.pth" + wget --continue ${PRESIGNED_URL/'*'/"${MODEL_PATH}/consolidated.${s}.pth"} -O ${TARGET_FOLDER}/${MODEL_PATH}/consolidated.${s}.pth done - wget --continue ${PRESIGNED_URL/'*'/"${MODEL_PATH}/params.json"} -O ${TARGET_FOLDER}"/${MODEL_PATH}/params.json" - wget --continue ${PRESIGNED_URL/'*'/"${MODEL_PATH}/checklist.chk"} -O ${TARGET_FOLDER}"/${MODEL_PATH}/checklist.chk" + wget --continue ${PRESIGNED_URL/'*'/"${MODEL_PATH}/params.json"} -O ${TARGET_FOLDER}/${MODEL_PATH}/params.json + wget --continue ${PRESIGNED_URL/'*'/"${MODEL_PATH}/checklist.chk"} -O ${TARGET_FOLDER}/${MODEL_PATH}/checklist.chk echo "Checking checksums" if [ "$CPU_ARCH" = "arm64" ]; then - (cd ${TARGET_FOLDER}"/${MODEL_PATH}" && md5 checklist.chk) + (cd ${TARGET_FOLDER}/${MODEL_PATH} && md5 checklist.chk) else - (cd ${TARGET_FOLDER}"/${MODEL_PATH}" && md5sum -c checklist.chk) + (cd ${TARGET_FOLDER}/${MODEL_PATH} && md5sum -c checklist.chk) fi -done \ No newline at end of file +done