{"id":15710304,"url":"https://github.com/aws/sagemaker-xgboost-container","last_synced_at":"2026-01-12T11:21:50.901Z","repository":{"id":37795149,"uuid":"187721865","full_name":"aws/sagemaker-xgboost-container","owner":"aws","description":"This is the Docker container based on open source framework XGBoost (https://xgboost.readthedocs.io/en/latest/) to allow customers use their own XGBoost scripts in SageMaker.","archived":false,"fork":false,"pushed_at":"2025-10-16T17:37:55.000Z","size":868,"stargazers_count":140,"open_issues_count":59,"forks_count":89,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-10-20T03:39:37.513Z","etag":null,"topics":["aws","distributed-training","gbm","inference","machine-learning","python","sagemaker","training","xgboost"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aws.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-05-20T22:30:07.000Z","updated_at":"2025-10-18T23:00:55.000Z","dependencies_parsed_at":"2024-05-20T20:57:03.580Z","dependency_job_id":"e6d72a99-78f0-4454-8492-64f36e519fc7","html_url":"https://github.com/aws/sagemaker-xgboost-container","commit_stats":{"total_commits":164,"total_committers":39,"mean_commits":4.205128205128205,"dds":0.8170731707317074,"last_synced_commit":"3587c210bdf43a6844a81bc2d6efa49f2b23637a"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/aws/sagemaker-xgboost-container","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Fsagemaker-xgboost-container","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Fsagemaker-xgboost-container/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Fsagemaker-xgboost-container/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Fsagemaker-xgboost-container/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aws","download_url":"https://codeload.github.com/aws/sagemaker-xgboost-container/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Fsagemaker-xgboost-container/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28338971,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T10:58:46.209Z","status":"ssl_error","status_checked_at":"2026-01-12T10:58:42.742Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","distributed-training","gbm","inference","machine-learning","python","sagemaker","training","xgboost"],"created_at":"2024-10-03T21:05:51.869Z","updated_at":"2026-01-12T11:21:50.878Z","avatar_url":"https://github.com/aws.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"===========================\nSageMaker XGBoost Container\n===========================\n\nSageMaker XGBoost Container is an open source library for making the\nXGBoost framework run on Amazon SageMaker.\n\nThis repository also contains Dockerfiles which install this library and dependencies\nfor building SageMaker XGBoost Framework images.\n\nThe SageMaker team uses this repository to build its official XGBoost Framework image. To use this image on SageMaker,\nsee `Python SDK \u003chttps://github.com/aws/sagemaker-python-sdk\u003e`__.\nFor end users, this repository is typically of interest if you need implementation details for\nthe official image, or if you want to use it to build your own customized XGBoost Framework image.\n\nTable of Contents\n-----------------\n\n#. `Getting Started \u003c#getting-started\u003e`__\n#. `Building your Image \u003c#building-your-image\u003e`__\n#. `Running the tests \u003c#running-the-tests\u003e`__\n\nGetting Started\n---------------\n\nPrerequisites\n~~~~~~~~~~~~~\n\nMake sure you have installed all of the following prerequisites on your\ndevelopment machine:\n\n- `Docker \u003chttps://www.docker.com/\u003e`__\n\nNote: CMake is required for XGBoost. If using macOS, install CMake (pip install cmake)\n\nRecommended\n^^^^^^^^^^^\n\n-  A Python environment management tool (e.g.\n   `PyEnv \u003chttps://github.com/pyenv/pyenv\u003e`__,\n   `VirtualEnv \u003chttps://virtualenv.pypa.io/en/stable/\u003e`__)\n\nBuilding your image\n-------------------\n\n`Amazon SageMaker \u003chttps://aws.amazon.com/documentation/sagemaker/\u003e`__\nutilizes Docker containers to run all training jobs \u0026 inference endpoints.\n\nThe Docker images are built from the Dockerfiles specified in\n`Docker/ \u003chttps://github.com/aws/sagemaker-xgboost-container/tree/master/docker\u003e`__.\n\nThe Docker files are grouped based on XGboost version and separated\nbased on Python version and processor type.\n\nThe Docker images, used to run training \u0026 inference jobs, are built from\nboth corresponding \"base\" and \"final\" Dockerfiles.\n\nBase Images\n~~~~~~~~~~~\n\nThe \"base\" Dockerfile encompass the installation of the framework and all of the dependencies\nneeded.\n\nTagging scheme is based on \u003cSageMaker-XGBoost-version\u003e-cpu-py3 (e.g. |XGBoostLatestVersion|-cpu-py3), where\n \u003cSageMaker-XGBoost-version\u003e is comprised of \u003cXGBoost-version\u003e-\u003cSageMaker-version\u003e.\n\nAll \"final\" Dockerfiles build images using base images that use the tagging scheme\nabove.\n\nIf you want to build your base docker image, then use:\n\n::\n\n    # All build instructions assume you're building from the root directory of the sagemaker-xgboost-container.\n\n    # CPU\n    docker build -t xgboost-container-base:\u003cSageMaker-XGBoost-version\u003e-cpu-py3 -f docker/\u003cSageMaker-XGBoost-version\u003e/base/Dockerfile.cpu .\n\n.. parsed-literal::\n\n    # Example\n\n    # CPU\n    docker build -t xgboost-container-base:|XGBoostLatestVersion|-cpu-py3 -f docker/|XGBoostLatestVersion|/base/Dockerfile.cpu .\n\n\nFinal Images\n~~~~~~~~~~~~\n\nThe \"final\" Dockerfiles encompass the installation of the SageMaker specific support code.\n\nAll \"final\" Dockerfiles use base images for building.\n\nThese \"base\" images are specified with the naming convention of\nxgboost-container-base:\u003cSageMaker-XGBoost-version\u003e-cpu-py3.\n\nBefore building \"final\" images:\n\nBuild your \"base\" image. Make sure it is named and tagged in accordance with your \"final\"\nDockerfile.\n\n::\n\n    # Create the SageMaker XGBoost Container Python package.\n    cd sagemaker-xgboost-container\n    python setup.py bdist_wheel --universal\n\nIf you want to build \"final\" Docker images, then use:\n\n::\n\n    # All build instructions assume you're building from the root directory of the sagemaker-xgboost-container.\n\n    # CPU\n    docker build -t \u003cimage_name\u003e:\u003ctag\u003e -f docker/\u003cxgboost-version\u003e/final/Dockerfile.cpu .\n\n.. parsed-literal::\n\n    # Example\n\n    # CPU\n    docker build -t preprod-xgboost-container:|XGBoostLatestVersion|-cpu-py3 -f docker/|XGBoostLatestVersion|/final/Dockerfile.cpu .\n\nRunning the tests\n-----------------\n\nRunning the tests requires installation of the SageMaker XGBoost Framework container code and its test\ndependencies.\n\n::\n\n    git clone https://github.com/aws/sagemaker-xgboost-container.git\n    cd sagemaker-xgboost-container\n    # The below command will work if you're using bash as the shell.\n    pip install -e .[test]\n\nConda is also required and can be installed by following the instructions at https://conda.io/projects/conda/en/latest/user-guide/install/index.html. For convenience, the Linux installation commands are provided as an example.\n\n::\n\n    curl -LO http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh\n    bash Miniconda3-latest-Linux-x86_64.sh -bfp /miniconda3\n    rm Miniconda3-latest-Linux-x86_64.sh\n    export PATH=/miniconda3/bin:${PATH}\n    conda update -y conda\n\nTests are defined in\n`test/ \u003chttps://github.com/aws/sagemaker-xgboost-container/tree/master/test\u003e`__\nand include unit, local integration, and SageMaker integration tests.\n\nUnit Tests\n~~~~~~~~~~\n\nIf you want to run unit tests, then use:\n\n::\n\n    # All test instructions should be run from the top level directory\n\n    pytest test/unit\n\n    # or you can use tox to run unit tests as well as flake8 and code coverage\n\n    tox\n    tox -e py3-xgboost1.0,flake8\n    tox -e py3-xgboost0.90,py3-xgboostlatest\n    tox -e py3-xgboost0.72\n\n\nLocal Integration Tests\n~~~~~~~~~~~~~~~~~~~~~~~\n\nRunning local integration tests require `Docker \u003chttps://www.docker.com/\u003e`__ and `AWS\ncredentials \u003chttps://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/setup-credentials.html\u003e`__,\nas the local integration tests make calls to a couple AWS services. The local integration tests and\nSageMaker integration tests require configurations specified within their respective\n`conftest.py \u003chttps://github.com/aws/sagemaker-xgboost-container/blob/master/test/conftest.py\u003e`__.\n\nBefore running local integration tests:\n\n#. Build your Docker image.\n#. Pass in the correct pytest arguments to run tests against your Docker image.\n\nIf you want to run local integration tests, then use:\n\n::\n\n    # Required arguments for integration tests are found in test/conftest.py\n\n    pytest test/integration/local --docker-base-name \u003cyour_docker_image\u003e \\\n                      --tag \u003cyour_docker_image_tag\u003e \\\n                      --py-version \u003c2_or_3\u003e \\\n                      --framework-version \u003cxgboost-version\u003e\n\n.. parsed-literal::\n\n    # Example\n    pytest test/integration/local --docker-base-name preprod-xgboost-container ``\\``\n                      --tag |XGBoostLatestVersion|-cpu-py3 ``\\``\n                      --py-version 3 ``\\``\n                      --framework-version |XGBoostLatestVersion|\n\nSageMaker Integration Tests\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nSageMaker integration tests require your Docker image to be within an `Amazon ECR repository \u003chttps://docs\n.aws.amazon.com/AmazonECS/latest/developerguide/ECS_Console_Repositories.html\u003e`__.\n\nThe Docker base name is your `ECR repository namespace \u003chttps://docs.aws.amazon\n.com/AmazonECR/latest/userguide/Repositories.html\u003e`__.\n\nThe instance type is your specified `Amazon SageMaker Instance Type\n\u003chttps://aws.amazon.com/sagemaker/pricing/instance-types/\u003e`__ that the SageMaker integration test will run on.\n\nBefore running SageMaker integration tests:\n\n#. Build your Docker image.\n#. Push the image to your ECR repository.\n#. Pass in the correct pytest arguments to run tests on SageMaker against the image within your ECR repository.\n\nIf you want to run a SageMaker integration end to end test on `Amazon\nSageMaker \u003chttps://aws.amazon.com/sagemaker/\u003e`__, then use:\n\n::\n\n    # Required arguments for integration tests are found in test/conftest.py\n\n    pytest test/integration/sagemaker --aws-id \u003cyour_aws_id\u003e \\\n                           --docker-base-name \u003cyour_docker_image\u003e \\\n                           --instance-type \u003camazon_sagemaker_instance_type\u003e \\\n                           --tag \u003cyour_docker_image_tag\u003e\n\n::\n\n    # Example\n    pytest test/integration/sagemaker --aws-id 12345678910 \\\n                           --docker-base-name preprod-xgboost-container \\\n                           --instance-type ml.m4.xlarge \\\n                           --tag 1.0\n\nContributing\n------------\n\nPlease read\n`CONTRIBUTING.md \u003chttps://github.com/aws/sagemaker-xgboost-container/blob/master/CONTRIBUTING.md\u003e`__\nfor details on our code of conduct, and the process for submitting pull\nrequests to us.\n\nLicense\n-------\n\nSageMaker XGboost Framework Container is licensed under the Apache 2.0 License. It is copyright 2019 Amazon\n.com, Inc. or its affiliates. All Rights Reserved. The license is available at:\nhttp://aws.amazon.com/apache2.0/\n\n.. |XGBoostLatestVersion| replace:: 1.7-1\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faws%2Fsagemaker-xgboost-container","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faws%2Fsagemaker-xgboost-container","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faws%2Fsagemaker-xgboost-container/lists"}