diff --git a/ChangeLog.md b/ChangeLog.md index 959a9085..8ff54091 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -9,6 +9,7 @@ Starting with v1.31.6, this file will contain a record of major features and upd - Modified the `%reset --snapshot` option to use the CreateGraphSnapshot API ([Link to PR](https://github.com/aws/graph-notebook/pull/654)) - Upgraded `setuptools` dependency to 70.x ([Link to PR](https://github.com/aws/graph-notebook/pull/649)) - Experimental support for Python 3.11 ([PR #1](https://github.com/aws/graph-notebook/pull/645)) ([PR #2](https://github.com/aws/graph-notebook/pull/656)) +- Updated sample SageMaker Lifecycle scripts ([Link to PR](https://github.com/aws/graph-notebook/pull/657)) ## Release 4.5.0 (July 15, 2024) diff --git a/additional-databases/sagemaker/sagemaker-notebook-lifecycle/install-graph-notebook-lc-cn.sh b/additional-databases/sagemaker/sagemaker-notebook-lifecycle/install-graph-notebook-lc-cn.sh index 121fac14..d7442cce 100644 --- a/additional-databases/sagemaker/sagemaker-notebook-lifecycle/install-graph-notebook-lc-cn.sh +++ b/additional-databases/sagemaker/sagemaker-notebook-lifecycle/install-graph-notebook-lc-cn.sh @@ -3,28 +3,18 @@ sudo -u ec2-user -i <<'EOF' echo "export GRAPH_NOTEBOOK_AUTH_MODE=DEFAULT" >> ~/.bashrc # set to IAM instead of DEFAULT if cluster is IAM enabled -echo "export GRAPH_NOTEBOOK_SERVICE=neptune-db" >> ~/.bashrc +echo "export GRAPH_NOTEBOOK_SERVICE=neptune-db" >> ~/.bashrc # set to neptune-graph for Neptune Analytics host echo "export GRAPH_NOTEBOOK_HOST=CHANGE-ME" >> ~/.bashrc echo "export GRAPH_NOTEBOOK_PORT=8182" >> ~/.bashrc echo "export NEPTUNE_LOAD_FROM_S3_ROLE_ARN=" >> ~/.bashrc echo "export AWS_REGION=cn-northwest-1" >> ~/.bashrc # modify region if needed -VERSION="" -for i in "$@" -do -case $i in - -v=*|--version=*) - VERSION="${i#*=}" - echo "set notebook version to ${VERSION}" - shift - ;; -esac -done +NOTEBOOK_VERSION="" source activate JupyterSystemEnv echo "installing Python 3 kernel" -python3 -m ipykernel install --sys-prefix --name python3 --display-name "Python 3" +python3 -m ipykernel install --sys-prefix --name python3 --display-name "Neptune_Python3" echo "installing python dependencies..." pip uninstall NeptuneGraphNotebook -y # legacy uninstall when we used to install from source in s3 @@ -40,10 +30,10 @@ pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn "itables<=1.4.2" pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn "awswrangler" -if [[ ${VERSION} == "" ]]; then +if [[ ${NOTEBOOK_VERSION} == "" ]]; then pip install --upgrade -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn graph-notebook else - pip install --upgrade -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn graph-notebook==${VERSION} + pip install --upgrade -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn graph-notebook==${NOTEBOOK_VERSION} fi echo "installing nbextensions..." @@ -53,7 +43,7 @@ echo "installing static resources..." python -m graph_notebook.static_resources.install echo "enabling visualization..." -if [[ ${VERSION//./} < 330 ]] && [[ ${VERSION} != "" ]]; then +if [[ ${NOTEBOOK_VERSION//./} < 330 ]] && [[ ${NOTEBOOK_VERSION} != "" ]]; then jupyter nbextension install --py --sys-prefix graph_notebook.widgets fi jupyter nbextension enable --py --sys-prefix graph_notebook.widgets @@ -93,7 +83,7 @@ AWS_REGION: ${AWS_REGION}" --aws_region "${AWS_REGION}" echo "Adding graph_notebook.magics to ipython config..." -if [[ ${VERSION//./} > 341 ]] || [[ ${VERSION} == "" ]]; then +if [[ ${NOTEBOOK_VERSION//./} > 341 ]] || [[ ${NOTEBOOK_VERSION} == "" ]]; then /home/ec2-user/anaconda3/envs/JupyterSystemEnv/bin/python -m graph_notebook.ipython_profile.configure_ipython_profile else echo "Skipping, unsupported on graph-notebook<=3.4.1" diff --git a/additional-databases/sagemaker/sagemaker-notebook-lifecycle/install-graph-notebook-lc.sh b/additional-databases/sagemaker/sagemaker-notebook-lifecycle/install-graph-notebook-lc.sh index 3cf9a216..8aa4184e 100644 --- a/additional-databases/sagemaker/sagemaker-notebook-lifecycle/install-graph-notebook-lc.sh +++ b/additional-databases/sagemaker/sagemaker-notebook-lifecycle/install-graph-notebook-lc.sh @@ -9,22 +9,12 @@ echo "export GRAPH_NOTEBOOK_PORT=8182" >> ~/.bashrc echo "export NEPTUNE_LOAD_FROM_S3_ROLE_ARN=" >> ~/.bashrc echo "export AWS_REGION=us-west-2" >> ~/.bashrc # modify region if needed -VERSION="" -for i in "$@" -do -case $i in - -v=*|--version=*) - VERSION="${i#*=}" - echo "set notebook version to ${VERSION}" - shift - ;; -esac -done +NOTEBOOK_VERSION="" source activate JupyterSystemEnv echo "installing Python 3 kernel" -python3 -m ipykernel install --sys-prefix --name python3 --display-name "Python 3" +python3 -m ipykernel install --sys-prefix --name python3 --display-name "Neptune_Python3" echo "installing python dependencies..." pip uninstall NeptuneGraphNotebook -y # legacy uninstall when we used to install from source in s3 @@ -40,10 +30,10 @@ pip install "nbclient<=0.7.0" pip install "itables<=1.4.2" pip install awswrangler -if [[ ${VERSION} == "" ]]; then +if [[ ${NOTEBOOK_VERSION} == "" ]]; then pip install --upgrade graph-notebook else - pip install --upgrade graph-notebook==${VERSION} + pip install --upgrade graph-notebook==${NOTEBOOK_VERSION} fi echo "installing nbextensions..." @@ -53,7 +43,7 @@ echo "installing static resources..." python -m graph_notebook.static_resources.install echo "enabling visualization..." -if [[ ${VERSION//./} < 330 ]] && [[ ${VERSION} != "" ]]; then +if [[ ${NOTEBOOK_VERSION//./} < 330 ]] && [[ ${NOTEBOOK_VERSION} != "" ]]; then jupyter nbextension install --py --sys-prefix graph_notebook.widgets fi jupyter nbextension enable --py --sys-prefix graph_notebook.widgets @@ -93,7 +83,7 @@ AWS_REGION: ${AWS_REGION}" --aws_region "${AWS_REGION}" echo "Adding graph_notebook.magics to ipython config..." -if [[ ${VERSION//./} > 341 ]] || [[ ${VERSION} == "" ]]; then +if [[ ${NOTEBOOK_VERSION//./} > 341 ]] || [[ ${NOTEBOOK_VERSION} == "" ]]; then /home/ec2-user/anaconda3/envs/JupyterSystemEnv/bin/python -m graph_notebook.ipython_profile.configure_ipython_profile else echo "Skipping, unsupported on graph-notebook<=3.4.1"