diff --git a/README.md b/README.md index 7de8dff..5e39e96 100755 --- a/README.md +++ b/README.md @@ -34,6 +34,8 @@ In a conda env with PyTorch / CUDA available, clone the repo and run in the top- pip install -e . ``` +Then to run the script: `./download.sh`. There are optional ENV variables that can be used for automation. + ## Inference Different models require different model-parallel (MP) values: diff --git a/download.sh b/download.sh index 39d92f4..a2c7bfd 100755 --- a/download.sh +++ b/download.sh @@ -5,10 +5,21 @@ set -e -read -p "Enter the URL from email: " PRESIGNED_URL -echo "" -read -p "Enter the list of models to download without spaces (7B,13B,70B,7B-chat,13B-chat,70B-chat), or press Enter for all: " MODEL_SIZE -TARGET_FOLDER="." # where all files should end up +# Check if PRESIGNED_URL environment variable is set +if [ -z "$PRESIGNED_URL" ]; then + read -p "Enter the URL from email: " PRESIGNED_URL +fi + +# Check if MODEL_SIZE environment variable is set +if [ -z "$MODEL_SIZE" ]; then + read -p "Enter the list of models to download without spaces (7B,13B,70B,7B-chat,13B-chat,70B-chat), or press Enter for all: " MODEL_SIZE +fi + +# Check if TARGET_FOLDER environment variable is set +if [ -z "$TARGET_FOLDER" ]; then + TARGET_FOLDER="." # Default target folder +fi + mkdir -p ${TARGET_FOLDER} if [[ $MODEL_SIZE == "" ]]; then @@ -67,4 +78,4 @@ do else (cd ${TARGET_FOLDER}"/${MODEL_PATH}" && md5sum -c checklist.chk) fi -done \ No newline at end of file +done