Skip to content

Commit

Permalink
Merge branch 'main' into release-1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
claytonparnell committed Jun 19, 2024
2 parents e0403b5 + 9695c95 commit 9f438ee
Show file tree
Hide file tree
Showing 9 changed files with 78 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Amazon SageMaker Distribution

Amazon SageMaker Distribution is a set of Docker images that include popular frameworks for machine learning, data
science and visualization.
science and visualization. For the list of supported SageMaker Distributions images, see [SageMaker Distributions Images](supported_images.md#supported-image-versions).

These images come in two variants, CPU and GPU, and include deep learning frameworks like PyTorch, TensorFlow and
Keras; popular Python packages like numpy, scikit-learn and pandas; and IDEs like Jupyter Lab. The distribution contains
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@
module = __import__("amazon_sagemaker_sql_editor")
module_location = os.path.dirname(module.__file__)
c.LanguageServerManager.extra_node_roots = [f"{module_location}/sql-language-server"]
c.AiExtension.default_language_model = "amazon-q:q-developer"
except:
pass
2 changes: 2 additions & 0 deletions build_artifacts/v2/v2.0/v2.0.0/cpu.additional_packages_env.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Add any additional packages here
conda-forge::mlflow[version='>=2.13.0,<3.0']
2 changes: 2 additions & 0 deletions build_artifacts/v2/v2.0/v2.0.0/gpu.additional_packages_env.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Add any additional packages here
conda-forge::mlflow[version='>=2.13.2,<3.0']
25 changes: 25 additions & 0 deletions supported_images.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## Supported Image Versions

The tables below list the supported SageMaker Distribution image versions. SageMaker will only release functionality and security fixes for images versions present in the tables. When you are building images or pulling images from the ECR repository, it is highly recommended for you to choose the supported image versions from the tables below.

### CPU Images

| Image Major Version | Image Minor Version | ECR Image URI |
|---------------------|---------------------|-----------------------|
|1 |1.8 |public.ecr.aws/sagemaker/sagemaker-distribution:1.8-cpu |
|1 |1.7 |public.ecr.aws/sagemaker/sagemaker-distribution:1.7-cpu |
|1 |1.6 |public.ecr.aws/sagemaker/sagemaker-distribution:1.6-cpu |
|1 |1.5 |public.ecr.aws/sagemaker/sagemaker-distribution:1.5-cpu |
|1 |1.4 |public.ecr.aws/sagemaker/sagemaker-distribution:1.4-cpu |
|0 |0.12 |public.ecr.aws/sagemaker/sagemaker-distribution:0.12-cpu |

### GPU Images

| Image Major Version | Image Minor Version | ECR Image URI |
|---------------------|---------------------|-----------------------|
|1 |1.8 |public.ecr.aws/sagemaker/sagemaker-distribution:1.8-gpu |
|1 |1.7 |public.ecr.aws/sagemaker/sagemaker-distribution:1.7-gpu |
|1 |1.6 |public.ecr.aws/sagemaker/sagemaker-distribution:1.6-gpu |
|1 |1.5 |public.ecr.aws/sagemaker/sagemaker-distribution:1.5-gpu |
|1 |1.4 |public.ecr.aws/sagemaker/sagemaker-distribution:1.4-gpu |
|0 |0.12 |public.ecr.aws/sagemaker/sagemaker-distribution:0.12-gpu |
1 change: 1 addition & 0 deletions template/v1/dirs/etc/jupyter/jupyter_server_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@
module = __import__("amazon_sagemaker_sql_editor")
module_location = os.path.dirname(module.__file__)
c.LanguageServerManager.extra_node_roots = [f"{module_location}/sql-language-server"]
c.AiExtension.default_language_model = "amazon-q:q-developer"
except:
pass
16 changes: 16 additions & 0 deletions test/test_artifacts/v2/mlflow.test.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
ARG SAGEMAKER_DISTRIBUTION_IMAGE
FROM $SAGEMAKER_DISTRIBUTION_IMAGE

ARG MAMBA_DOCKERFILE_ACTIVATE=1

RUN python -c "import mlflow"

RUN sudo apt-get update && sudo apt-get install -y git && \
git clone --recursive https://github.com/mlflow/mlflow.git && \
:

WORKDIR "mlflow/"
COPY --chown=$MAMBA_USER:$MAMBA_USER scripts/run_mlflow_tests.sh .
RUN chmod +x run_mlflow_tests.sh
# Run tests in run_matplotlib_tests.sh
CMD ["./run_mlflow_tests.sh"]
28 changes: 28 additions & 0 deletions test/test_artifacts/v2/scripts/run_mlflow_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

# Run examples for keras, pytorch, sklearn, tensorflow
cd examples

# keras
cd keras/
python train.py
cd -

# pytorch
cd pytorch/
python mnist_tensorboard_artifact.py
cd -

# sklearn
for folder in "sklearn_autolog/" "sklearn_elasticnet_diabetes/linux/" "sklearn_elasticnet_wine/" "sklearn_logistic_regression/"; do
cd ${folder}
for file in *.py; do
python "$file" || exit $?
done
cd -
done

# tensorflow
cd tensorflow/
python train.py
cd -
2 changes: 2 additions & 0 deletions test/test_dockerfile_based_harness.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
("amazon_sagemaker_sql_editor.test.Dockerfile", ["amazon_sagemaker_sql_editor"]),
("serve.test.Dockerfile", ["serve-langchain"]),
("langchain-aws.test.Dockerfile", ["langchain-aws"]),
("mlflow.test.Dockerfile", ["mlflow"]),
],
)
def test_dockerfiles_for_cpu(
Expand Down Expand Up @@ -83,6 +84,7 @@ def test_dockerfiles_for_cpu(
("amazon_sagemaker_sql_editor.test.Dockerfile", ["amazon_sagemaker_sql_editor"]),
("serve.test.Dockerfile", ["serve-langchain"]),
("langchain-aws.test.Dockerfile", ["langchain-aws"]),
("mlflow.test.Dockerfile", ["mlflow"]),
],
)
def test_dockerfiles_for_gpu(
Expand Down

0 comments on commit 9f438ee

Please sign in to comment.