diff --git a/00_Intro/bedrock_boto3_setup.ipynb b/00_Intro/bedrock_boto3_setup.ipynb index 0a1391f5..34abcb99 100644 --- a/00_Intro/bedrock_boto3_setup.ipynb +++ b/00_Intro/bedrock_boto3_setup.ipynb @@ -39,9 +39,9 @@ "source": [ "# Make sure you ran `download-dependencies.sh` from the root of the repository first!\n", "%pip install --no-build-isolation --force-reinstall \\\n", - " ../dependencies/awscli-1.27.162-py3-none-any.whl \\\n", - " ../dependencies/boto3-1.26.162-py3-none-any.whl \\\n", - " ../dependencies/botocore-1.29.162-py3-none-any.whl" + " ../dependencies/awscli-*-py3-none-any.whl \\\n", + " ../dependencies/boto3-*-py3-none-any.whl \\\n", + " ../dependencies/botocore-*-py3-none-any.whl" ] }, { diff --git a/01_Generation/00_generate_w_bedrock.ipynb b/01_Generation/00_generate_w_bedrock.ipynb index 00a33ec4..f0c182ce 100644 --- a/01_Generation/00_generate_w_bedrock.ipynb +++ b/01_Generation/00_generate_w_bedrock.ipynb @@ -68,9 +68,9 @@ "source": [ "# Make sure you ran `download-dependencies.sh` from the root of the repository first!\n", "%pip install --no-build-isolation --force-reinstall \\\n", - " ../dependencies/awscli-1.27.162-py3-none-any.whl \\\n", - " ../dependencies/boto3-1.26.162-py3-none-any.whl \\\n", - " ../dependencies/botocore-1.29.162-py3-none-any.whl\n", + " ../dependencies/awscli-*-py3-none-any.whl \\\n", + " ../dependencies/boto3-*-py3-none-any.whl \\\n", + " ../dependencies/botocore-*-py3-none-any.whl\n", "\n", "%pip install --quiet langchain==0.0.249" ] diff --git a/01_Generation/01_zero_shot_generation.ipynb b/01_Generation/01_zero_shot_generation.ipynb index ba619ef8..c67ea8b7 100644 --- a/01_Generation/01_zero_shot_generation.ipynb +++ b/01_Generation/01_zero_shot_generation.ipynb @@ -66,9 +66,9 @@ "source": [ "# Make sure you ran `download-dependencies.sh` from the root of the repository first!\n", "%pip install --no-build-isolation --force-reinstall \\\n", - " ../dependencies/awscli-1.27.162-py3-none-any.whl \\\n", - " ../dependencies/boto3-1.26.162-py3-none-any.whl \\\n", - " ../dependencies/botocore-1.29.162-py3-none-any.whl\n", + " ../dependencies/awscli-*-py3-none-any.whl \\\n", + " ../dependencies/boto3-*-py3-none-any.whl \\\n", + " ../dependencies/botocore-*-py3-none-any.whl\n", "\n", "%pip install --quiet langchain==0.0.249" ] diff --git a/01_Generation/02_contextual_generation.ipynb b/01_Generation/02_contextual_generation.ipynb index bfcb50d4..fc1a2a31 100644 --- a/01_Generation/02_contextual_generation.ipynb +++ b/01_Generation/02_contextual_generation.ipynb @@ -74,9 +74,9 @@ "source": [ "# Make sure you ran `download-dependencies.sh` from the root of the repository first!\n", "%pip install --no-build-isolation --force-reinstall \\\n", - " ../dependencies/awscli-1.27.162-py3-none-any.whl \\\n", - " ../dependencies/boto3-1.26.162-py3-none-any.whl \\\n", - " ../dependencies/botocore-1.29.162-py3-none-any.whl\n", + " ../dependencies/awscli-*-py3-none-any.whl \\\n", + " ../dependencies/boto3-*-py3-none-any.whl \\\n", + " ../dependencies/botocore-*-py3-none-any.whl\n", "\n", "%pip install --quiet langchain==0.0.249 \"transformers>=4.24,<5\"" ] diff --git a/02_Summarization/01.small-text-summarization-claude.ipynb b/02_Summarization/01.small-text-summarization-claude.ipynb index dc94c521..063a2f00 100644 --- a/02_Summarization/01.small-text-summarization-claude.ipynb +++ b/02_Summarization/01.small-text-summarization-claude.ipynb @@ -61,9 +61,9 @@ "source": [ "# Make sure you ran `download-dependencies.sh` from the root of the repository first!\n", "%pip install --no-build-isolation --force-reinstall \\\n", - " ../dependencies/awscli-1.27.162-py3-none-any.whl \\\n", - " ../dependencies/boto3-1.26.162-py3-none-any.whl \\\n", - " ../dependencies/botocore-1.29.162-py3-none-any.whl\n", + " ../dependencies/awscli-*-py3-none-any.whl \\\n", + " ../dependencies/boto3-*-py3-none-any.whl \\\n", + " ../dependencies/botocore-*-py3-none-any.whl\n", "\n", "%pip install --quiet langchain==0.0.249" ] diff --git a/02_Summarization/01.small-text-summarization-titan.ipynb b/02_Summarization/01.small-text-summarization-titan.ipynb index d951fc77..06641f81 100644 --- a/02_Summarization/01.small-text-summarization-titan.ipynb +++ b/02_Summarization/01.small-text-summarization-titan.ipynb @@ -60,9 +60,9 @@ "source": [ "# Make sure you ran `download-dependencies.sh` from the root of the repository first!\n", "%pip install --no-build-isolation --force-reinstall \\\n", - " ../dependencies/awscli-1.27.162-py3-none-any.whl \\\n", - " ../dependencies/boto3-1.26.162-py3-none-any.whl \\\n", - " ../dependencies/botocore-1.29.162-py3-none-any.whl\n", + " ../dependencies/awscli-*-py3-none-any.whl \\\n", + " ../dependencies/boto3-*-py3-none-any.whl \\\n", + " ../dependencies/botocore-*-py3-none-any.whl\n", "\n", "%pip install --quiet langchain==0.0.249" ] diff --git a/02_Summarization/02.long-text-summarization-titan.ipynb b/02_Summarization/02.long-text-summarization-titan.ipynb index f7d0631b..41f4e5c1 100644 --- a/02_Summarization/02.long-text-summarization-titan.ipynb +++ b/02_Summarization/02.long-text-summarization-titan.ipynb @@ -61,9 +61,9 @@ "source": [ "# Make sure you ran `download-dependencies.sh` from the root of the repository first!\n", "%pip install --no-build-isolation --force-reinstall \\\n", - " ../dependencies/awscli-1.27.162-py3-none-any.whl \\\n", - " ../dependencies/boto3-1.26.162-py3-none-any.whl \\\n", - " ../dependencies/botocore-1.29.162-py3-none-any.whl\n", + " ../dependencies/awscli-*-py3-none-any.whl \\\n", + " ../dependencies/boto3-*-py3-none-any.whl \\\n", + " ../dependencies/botocore-*-py3-none-any.whl\n", "\n", "%pip install --quiet langchain==0.0.249 \"transformers>=4.24,<5\"" ] diff --git a/03_QuestionAnswering/00_qa_w_bedrock_titan.ipynb b/03_QuestionAnswering/00_qa_w_bedrock_titan.ipynb index ce95ad04..6b8f6ad4 100644 --- a/03_QuestionAnswering/00_qa_w_bedrock_titan.ipynb +++ b/03_QuestionAnswering/00_qa_w_bedrock_titan.ipynb @@ -45,9 +45,9 @@ "source": [ "# Make sure you ran `download-dependencies.sh` from the root of the repository first!\n", "%pip install --no-build-isolation --force-reinstall \\\n", - " ../dependencies/awscli-1.27.162-py3-none-any.whl \\\n", - " ../dependencies/boto3-1.26.162-py3-none-any.whl \\\n", - " ../dependencies/botocore-1.29.162-py3-none-any.whl\n", + " ../dependencies/awscli-*-py3-none-any.whl \\\n", + " ../dependencies/boto3-*-py3-none-any.whl \\\n", + " ../dependencies/botocore-*-py3-none-any.whl\n", "\n", "%pip install --quiet langchain==0.0.249" ] diff --git a/03_QuestionAnswering/01_qa_w_rag_claude.ipynb b/03_QuestionAnswering/01_qa_w_rag_claude.ipynb index 91b2a64b..3d38996e 100644 --- a/03_QuestionAnswering/01_qa_w_rag_claude.ipynb +++ b/03_QuestionAnswering/01_qa_w_rag_claude.ipynb @@ -114,9 +114,9 @@ "source": [ "# Make sure you ran `download-dependencies.sh` from the root of the repository first!\n", "%pip install --no-build-isolation --force-reinstall \\\n", - " ../dependencies/awscli-1.27.162-py3-none-any.whl \\\n", - " ../dependencies/boto3-1.26.162-py3-none-any.whl \\\n", - " ../dependencies/botocore-1.29.162-py3-none-any.whl\n", + " ../dependencies/awscli-*-py3-none-any.whl \\\n", + " ../dependencies/boto3-*-py3-none-any.whl \\\n", + " ../dependencies/botocore-*-py3-none-any.whl\n", "\n", "%pip install --quiet \"faiss-cpu>=1.7,<2\" langchain==0.0.249 \"pypdf>=3.8,<4\"" ] diff --git a/04_Chatbot/00_Chatbot_AI21.ipynb b/04_Chatbot/00_Chatbot_AI21.ipynb index 5eafac2d..2a4885fb 100644 --- a/04_Chatbot/00_Chatbot_AI21.ipynb +++ b/04_Chatbot/00_Chatbot_AI21.ipynb @@ -73,9 +73,9 @@ "source": [ "# Make sure you ran `download-dependencies.sh` from the root of the repository first!\n", "%pip install --no-build-isolation --force-reinstall \\\n", - " ../dependencies/awscli-1.27.162-py3-none-any.whl \\\n", - " ../dependencies/boto3-1.26.162-py3-none-any.whl \\\n", - " ../dependencies/botocore-1.29.162-py3-none-any.whl" + " ../dependencies/awscli-*-py3-none-any.whl \\\n", + " ../dependencies/boto3-*-py3-none-any.whl \\\n", + " ../dependencies/botocore-*-py3-none-any.whl" ] }, { diff --git a/04_Chatbot/00_Chatbot_Claude.ipynb b/04_Chatbot/00_Chatbot_Claude.ipynb index d8355cb7..6a98f1d2 100644 --- a/04_Chatbot/00_Chatbot_Claude.ipynb +++ b/04_Chatbot/00_Chatbot_Claude.ipynb @@ -71,9 +71,9 @@ "source": [ "# Make sure you ran `download-dependencies.sh` from the root of the repository first!\n", "%pip install --no-build-isolation --force-reinstall \\\n", - " ../dependencies/awscli-1.27.162-py3-none-any.whl \\\n", - " ../dependencies/boto3-1.26.162-py3-none-any.whl \\\n", - " ../dependencies/botocore-1.29.162-py3-none-any.whl" + " ../dependencies/awscli-*-py3-none-any.whl \\\n", + " ../dependencies/boto3-*-py3-none-any.whl \\\n", + " ../dependencies/botocore-*-py3-none-any.whl" ] }, { diff --git a/04_Chatbot/00_Chatbot_Titan.ipynb b/04_Chatbot/00_Chatbot_Titan.ipynb index 8ea8f0f3..46ea3444 100644 --- a/04_Chatbot/00_Chatbot_Titan.ipynb +++ b/04_Chatbot/00_Chatbot_Titan.ipynb @@ -71,9 +71,9 @@ "source": [ "# Make sure you ran `download-dependencies.sh` from the root of the repository first!\n", "%pip install --no-build-isolation --force-reinstall \\\n", - " ../dependencies/awscli-1.27.162-py3-none-any.whl \\\n", - " ../dependencies/boto3-1.26.162-py3-none-any.whl \\\n", - " ../dependencies/botocore-1.29.162-py3-none-any.whl" + " ../dependencies/awscli-*-py3-none-any.whl \\\n", + " ../dependencies/boto3-*-py3-none-any.whl \\\n", + " ../dependencies/botocore-*-py3-none-any.whl" ] }, { diff --git a/05_Image/Bedrock Stable Diffusion XL.ipynb b/05_Image/Bedrock Stable Diffusion XL.ipynb index de4634fe..ee059110 100644 --- a/05_Image/Bedrock Stable Diffusion XL.ipynb +++ b/05_Image/Bedrock Stable Diffusion XL.ipynb @@ -67,9 +67,9 @@ "source": [ "# Make sure you ran `download-dependencies.sh` from the root of the repository first!\n", "%pip install --no-build-isolation --force-reinstall \\\n", - " ../dependencies/awscli-1.27.162-py3-none-any.whl \\\n", - " ../dependencies/boto3-1.26.162-py3-none-any.whl \\\n", - " ../dependencies/botocore-1.29.162-py3-none-any.whl\n", + " ../dependencies/awscli-*-py3-none-any.whl \\\n", + " ../dependencies/boto3-*-py3-none-any.whl \\\n", + " ../dependencies/botocore-*-py3-none-any.whl\n", "\n", "%pip install --quiet \"pillow>=9.5,<10\"" ] diff --git a/download-dependencies.sh b/download-dependencies.sh index e9c5c79f..d71d3f9d 100755 --- a/download-dependencies.sh +++ b/download-dependencies.sh @@ -1,10 +1,13 @@ #!/bin/sh -echo "Creating directory" -mkdir -p ./dependencies && \ -cd ./dependencies && \ +set -e + +echo "(Re)-creating directory" +rm -rf ./dependencies +mkdir ./dependencies +cd ./dependencies echo "Downloading dependencies" -curl -sS https://preview.documentation.bedrock.aws.dev/Documentation/SDK/bedrock-python-sdk.zip > sdk.zip && \ +curl -sS https://d2eo22ngex1n9g.cloudfront.net/Documentation/SDK/bedrock-python-sdk.zip > sdk.zip echo "Unpacking dependencies" # (SageMaker Studio system terminals don't have `unzip` utility installed) if command -v unzip &> /dev/null