skillfed

sagemaker-containers

Open source library for creating containers to run on Amazon SageMaker.

sagemaker-containers v2.8.6.post2 189.8K downloads/30d#9,923 on PyPI188
Permissive license Apache License 2.0 Abandoned released

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-containers

uv

uv add sagemaker-containers

poetry

poetry add sagemaker-containers

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseNatural Language :: EnglishProgramming Language :: PythonProgramming Language :: Python :: 2.7Programming Language :: Python :: 3.6

Tags

sagemaker docker container buildersagemaker training containeraws sagemaker framework containerssagemaker script executionsagemaker inference containerdocker container for sagemakersagemaker model serving container
deprecatedsagemakeraws

More Application Frameworks packages