-
Notifications
You must be signed in to change notification settings - Fork 32
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
use 'sagemaker-python-sdk' instead of 'sagemaker' #504
Changes from 13 commits
baf0a86
d25a6d8
8e04193
c04833c
83d055d
3bb744e
a7df5fe
f9faddd
47c628c
40b069a
37c00b1
04a3d25
e321733
a33ca1f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,16 +10,15 @@ RAPIDS can be used in a few ways with [AWS SageMaker](https://aws.amazon.com/sag | |
|
||
To get started head to [the SageMaker console](https://console.aws.amazon.com/sagemaker/) and create a [new SageMaker Notebook Instance](https://console.aws.amazon.com/sagemaker/home#/notebook-instances/create). | ||
|
||
Choose `Notebook > Notebook Instances > Create notebook instance`. | ||
Choose `Applications and IDEs > Notebooks > Create notebook instance`. | ||
|
||
### Select your instance | ||
|
||
If a field is not mentioned below, leave the default values: | ||
|
||
- **NOTEBOOK_INSTANCE_NAME** = Name of the notebook instance | ||
- **NOTEBOOK_INSTANCE_TYPE** = Type of notebook instance. Select a RAPIDS-compatible GPU ([see the RAPIDS docs](https://docs.rapids.ai/install#system-req)) as the SageMaker Notebook instance type (e.g., `ml.p3.2xlarge`). | ||
- **PLATFORM_IDENTIFIER** = 'Amazon Linux 2, Jupyter Lab 3' | ||
- **IAM_ROLE** = Create a new role > Create role | ||
- **Notebook instance name** = Name of the notebook instance | ||
- **Notebook instance type** = Type of notebook instance. Select a RAPIDS-compatible GPU ([see the RAPIDS docs](https://docs.rapids.ai/install#system-req)) as the SageMaker Notebook instance type (e.g., `ml.p3.2xlarge`). | ||
- **Platform identifier** = 'Amazon Linux 2, Jupyter Lab 4' | ||
|
||
 | ||
|
||
|
@@ -29,7 +28,7 @@ If a field is not mentioned below, leave the default values: | |
|
||
We can add a RAPIDS conda environment to the set of Jupyter ipython kernels available in our SageMaker notebook instance by installing in a [lifecycle configuration script](https://docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html). | ||
|
||
Create a new lifecycle configuration (via the 'Additional Options' dropdown). | ||
Create a new lifecycle configuration (via the 'Additional Configuration' dropdown). | ||
|
||
 | ||
|
||
|
@@ -42,10 +41,10 @@ set -e | |
|
||
sudo -u ec2-user -i <<'EOF' | ||
|
||
mamba create -y -n rapids {{ rapids_conda_channels }} {{ rapids_conda_packages }} \ | ||
mamba create -y -n rapids {{ rapids_conda_channels }} {{ rapids_sagemaker_conda_packages }} \ | ||
boto3 \ | ||
ipykernel \ | ||
sagemaker | ||
'sagemaker-python-sdk>=2.239.0' | ||
|
||
conda activate rapids | ||
|
||
|
@@ -54,6 +53,12 @@ echo "kernel install completed" | |
EOF | ||
``` | ||
|
||
```{warning} | ||
RAPIDS `>24.12` will not be installable on SageMaker Notebook Instances until those instances support | ||
Amazon Linux 2023 or other Linux distributions with GLIBC of at least 2.28. | ||
For more details, see https://github.com/rapidsai/deployment/issues/520. | ||
jameslamb marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jacobtomlinson what do you think about this language for a warning? I checked the preview and looks like it's rendering OK: ![]() https://rapids-deployment--504.org.readthedocs.build/en/504/cloud/aws/sagemaker/ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Language looks good 👍 |
||
|
||
Set the volume size to at least `15GB`, to accommodate the conda environment. | ||
|
||
Then launch the instance. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,16 +34,22 @@ | |
"rapids_conda_packages": f"rapids={stable_version} python=3.12 cuda-version=12.5", | ||
"rapids_pip_index": "https://pypi.nvidia.com", | ||
"rapids_pip_version": stable_version, | ||
# SageMaker Notebook Instance examples need to stay pinned to an older RAPIDS until this is resolved: | ||
# https://github.com/rapidsai/deployment/issues/520 | ||
"rapids_sagemaker_conda_packages": "rapids=24.12 python=3.12 cuda-version=12.5", | ||
}, | ||
"nightly": { | ||
"rapids_version": f"{nightly_version}-nightly", | ||
"rapids_version": f"{nightly_version}", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nothing in the repo relies on this git grep rapids_version And in fact, this difference is causing some bugs. Look at https://docs.rapids.ai/deployment/nightly/platforms/databricks/#install-rapids-and-dask .... it's saying you should install ![]() There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah I think this might be a holdover from a previous naming scheme. Fine to remove it. |
||
"rapids_api_docs_version": "nightly", | ||
"rapids_container": f"rapidsai/base:{nightly_version + 'a'}-cuda12.5-py3.12", | ||
"rapids_notebooks_container": f"rapidsai/notebooks:{nightly_version + 'a'}-cuda12.5-py3.12", | ||
"rapids_conda_channels": "-c rapidsai-nightly -c conda-forge -c nvidia", | ||
"rapids_conda_packages": f"rapids={nightly_version} python=3.12 cuda-version=12.5", | ||
"rapids_pip_index": "https://pypi.anaconda.org/rapidsai-wheels-nightly/simple", | ||
"rapids_pip_version": f"{nightly_version}.*,>=0.0.0a0", | ||
# SageMaker Notebook Instance examples need to stay pinned to an older RAPIDS until this is resolved: | ||
# https://github.com/rapidsai/deployment/issues/520 | ||
"rapids_sagemaker_conda_packages": "rapids=24.12 python=3.12 cuda-version=12.5", | ||
}, | ||
} | ||
rapids_version = ( | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -779,7 +779,7 @@ | |
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Next let's append write the remaining pieces of the Dockerfile, namely adding the sagemaker-training-toolkit, flask, dask-ml, and copying our python code." | ||
"Next let's append the remaining pieces of the Dockerfile, namely adding dependencies and our Python code." | ||
] | ||
}, | ||
{ | ||
|
@@ -805,10 +805,13 @@ | |
"\n", | ||
"# install a few more dependencies\n", | ||
"RUN conda install --yes -n base \\\n", | ||
" {{ rapids_conda_channels }} \\\n", | ||
" cupy \\\n", | ||
" dask-ml \\\n", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was missing, and so the example code failed like this:
|
||
" flask \\\n", | ||
" protobuf \\\n", | ||
" sagemaker\n", | ||
" rapids-dask-dependency=${{ rapids_version }} \\\n", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To ensure |
||
" 'sagemaker-python-sdk>=2.239.0'\n", | ||
"\n", | ||
"# path where SageMaker looks for code when container runs in the cloud\n", | ||
"ENV CLOUD_PATH=\"/opt/ml/code\"\n", | ||
|
@@ -855,7 +858,7 @@ | |
" cupy \\\n", | ||
" flask \\\n", | ||
" protobuf \\\n", | ||
" sagemaker\n", | ||
" 'sagemaker-python-sdk>=2.239.0'\n", | ||
"\n", | ||
"# path where SageMaker looks for code when container runs in the cloud\n", | ||
"ENV CLOUD_PATH=\"/opt/ml/code\"\n", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes here:
Amazon Linux 2, Jupyter Lab 4
(the latest platform SageMaker supports)