Skip to content

Commit

Permalink
fix(deps): download-dependencies.sh in SMStudio
Browse files Browse the repository at this point in the history
chmod download-dependencies.sh to (hopefully) allow executing the
script by default after git clone. Add a branch to extract the SDK
file via Python in case the `unzip` CLI utility is not installed -
which is the case in SageMaker Studio.
  • Loading branch information
athewsey committed Jul 26, 2023
1 parent a05db69 commit b667c70
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions download-dependencies.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,11 @@ cd ./dependencies && \
echo "Downloading dependencies"
curl -sS https://preview.documentation.bedrock.aws.dev/Documentation/SDK/bedrock-python-sdk.zip > sdk.zip && \
echo "Unpacking dependencies"
unzip sdk.zip && \
rm sdk.zip
# (SageMaker Studio system terminals don't have `unzip` utility installed)
if command -v unzip &> /dev/null
then
unzip sdk.zip && rm sdk.zip
else
echo "'unzip' command not found: Trying to unzip via Python"
python -m zipfile -e sdk.zip . && rm sdk.zip
fi

0 comments on commit b667c70

Please sign in to comment.