Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved version selection functionality in SageMaker Lifecycle #203

Merged
merged 1 commit into from
Oct 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions additionaldocs/sagemaker/install-graph-explorer-lc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,25 @@ echo "Neptune URI: ${NEPTUNE_URI}"
echo "Explorer region: ${AWS_REGION}"
echo "Explorer IAM auth mode: ${IAM}"

ECR_TOKEN=$(curl -k https://public.ecr.aws/token/ | jq -r '.token')
LATEST_ECR_RELEASE=$(curl -k -H "Authorization: Bearer $ECR_TOKEN" https://public.ecr.aws/v2/neptune/graph-explorer/tags/list | jq -r '.tags | sort_by(split(".") | try map(tonumber) catch [0,0,0])[-1]')

echo "Pulling and starting graph-explorer..."
if [[ ${EXPLORER_VERSION} == "" ]]; then
EXPLORER_ECR_TAG=sagemaker-latest-SNAPSHOT
EXPLORER_ECR_TAG=sagemaker-${LATEST_ECR_RELEASE}
else
EXPLORER_ECR_TAG=sagemaker-${EXPLORER_VERSION}
if [[ ${EXPLORER_VERSION//./} -ge 140 ]]; then
EXPLORER_ECR_TAG=sagemaker-${EXPLORER_VERSION}
elif [[ ${EXPLORER_VERSION} == *latest* ]]; then
EXPLORER_ECR_TAG=sagemaker-latest-SNAPSHOT
elif [[ ${EXPLORER_VERSION} == *dev* ]]; then
EXPLORER_ECR_TAG=sagemaker-dev
else
echo "Specified Graph Explorer version does not support use on SageMaker. Defaulting to latest release."
EXPLORER_ECR_TAG=sagemaker-${LATEST_ECR_RELEASE}
fi
fi
echo "Using explorer image tag: ${EXPLORER_ECR_TAG}"

docker run -d -p 9250:9250 \
--env HOST=127.0.0.1 \
--env PUBLIC_OR_PROXY_ENDPOINT=${EXPLORER_URI} \
Expand Down