sagemaker-containers
Open source library for creating containers to run on Amazon SageMaker.
What it is and what it does
SageMaker Containers is a deprecated library for building Docker images that run on Amazon SageMaker. It automates the setup of SageMaker-compatible containers by handling script entry points, hyperparameter injection as command-line arguments, and environment variable provisioning (such as SM_MODEL_DIR for model checkpoints and SM_CHANNEL_* for input data channels). The library was designed to simplify the process of bringing custom training and inference code to SageMaker without manually managing the container lifecycle.
The package has been abandoned since June 2020 and is no longer maintained. AWS has explicitly deprecated it in favor of two successor projects: SageMaker Training Toolkit for model training and SageMaker Inference Toolkit for model serving. Any new projects should use those toolkits instead. Existing deployments may continue to work, but security updates, bug fixes, and compatibility with newer SageMaker features are no longer guaranteed.
Use it for:
- Building legacy SageMaker training containers that execute Python or shell scripts with hyperparameter support.
- Creating SageMaker-compatible inference containers that read model artifacts from S3 and serve predictions.
- Mapping SageMaker training job hyperparameters to script command-line arguments automatically.
- Managing SageMaker environment variables (SM_MODEL_DIR, SM_CHANNEL_*) within custom training scripts.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides tools to build Docker containers compatible with Amazon SageMaker for model training and inference, handling script execution, hyperparameter mapping, and environment variable management.
No. The package is abandoned (last update 2020-06-22, repository archived) and explicitly deprecated by AWS in favor of SageMaker Training Toolkit and SageMaker Inference Toolkit. High install friction and no active maintenance mean no security updates or compatibility fixes. Use the recommended successor toolkits for any new SageMaker work; only consider this if maintaining legacy code that already depends on it.
Install
sagemaker-containers on PyPI
pip
pip install sagemaker-containersuv
uv add sagemaker-containerspoetry
poetry add sagemaker-containersInstalling sagemaker-containers
Before you install
High install friction and abandoned maintenance status. The package has not been updated since 2020-06-22 and its repository is archived. AWS explicitly recommends using SageMaker Training Toolkit and SageMaker Inference Toolkit instead.
License in practice
Licensed under Apache License 2.0 (permissive), which permits commercial and private use with minimal restrictions, though the package's deprecated status should weigh heavily in any adoption decision.
Quickstart
# Install
pip install sagemaker-containers
# In Dockerfile
FROM tensorflow/tensorflow:2.0.0a0
RUN pip install sagemaker-containers
COPY train.py /opt/ml/code/train.py
ENV SAGEMAKER_PROGRAM train.py
Package is deprecated; AWS recommends using SageMaker Training Toolkit or SageMaker Inference Toolkit instead. No runtime dependencies, but requires Docker and SageMaker integration.
Verify before relying
- Whether existing SageMaker Containers deployments remain functional or if migration to the recommended toolkits is urgent.
- Compatibility with current SageMaker API versions and whether deprecated features have been removed from SageMaker itself.
Package facts
| License | Apache License 2.0 (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | abandoned — 2,244 days since the last release |
| Last repo commit | (repository archived) |
| First released | |
| Downloads | 189,791/month — #9,923 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: sagemaker_containers-2.8.6.post2.tar.gz
Tags
More Application Frameworks packages
FastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
textualTextual is a Python framework for building…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
mcpBuild and connect to Model Context Protocol…
permissive · top 1,000 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
sagemaker-trainingIntegrates training scripts into Docker…
permissive · top 15,000 on PyPI
sagemaker-inferenceProvides a model serving stack for deploying…
permissive · top 15,000 on PyPI
sagemaker-trainTrains and deploys machine learning models on…
unclear · top 5,000 on PyPI
sagemakerSageMaker Python SDK is a library for training…
permissive · top 5,000 on PyPI
smdebug-rulesconfigProvides preconfigured rule definitions and…
permissive · top 5,000 on PyPI
sagemaker-serveProvides model serving and deployment…
permissive · top 5,000 on PyPI
cogCog packages machine learning models into…
permissive · top 5,000 on PyPI
sagemaker-schema-inference-artifactsProvides pre-built schema inference artifacts…
permissive · top 5,000 on PyPI
model-hosting-container-standardsProvides standardized FastAPI-based handlers…
permissive · top 5,000 on PyPI
sagemaker-experimentsTracks machine learning experiments, trials,…
permissive · top 15,000 on PyPI