• About
  • Disclaimer
  • Privacy Policy
  • Contact
Sunday, June 15, 2025
Cyber Defense GO
  • Login
  • Home
  • Cyber Security
  • Artificial Intelligence
  • Machine Learning
  • Data Analysis
  • Computer Networking
  • Disaster Restoration
No Result
View All Result
  • Home
  • Cyber Security
  • Artificial Intelligence
  • Machine Learning
  • Data Analysis
  • Computer Networking
  • Disaster Restoration
No Result
View All Result
Cyber Defense Go
No Result
View All Result
Home Machine Learning

Streamline {custom} atmosphere provisioning for Amazon SageMaker Studio: An automatic CI/CD pipeline strategy

Md Sazzad Hossain by Md Sazzad Hossain
0
Streamline {custom} atmosphere provisioning for Amazon SageMaker Studio: An automatic CI/CD pipeline strategy
585
SHARES
3.2k
VIEWS
Share on FacebookShare on Twitter


Attaching a {custom} Docker picture to an Amazon SageMaker Studio area includes a number of steps. First, you have to construct and push the picture to Amazon Elastic Container Registry (Amazon ECR). You additionally have to guarantee that the Amazon SageMaker area execution position has the required permissions to drag the picture from Amazon ECR. After the picture is pushed to Amazon ECR, you create a SageMaker {custom} picture on the AWS Administration Console. Lastly, you replace the SageMaker area configuration to specify the {custom} picture Amazon Useful resource Title (ARN). This multi-step course of must be adopted manually each time end-users create new {custom} Docker photographs to make them accessible in SageMaker Studio.

On this put up, we clarify learn how to automate this course of. This strategy means that you can replace the SageMaker configuration with out writing extra infrastructure code, provision {custom} photographs, and connect them to SageMaker domains. By adopting this automation, you’ll be able to deploy constant and standardized analytics environments throughout your group, resulting in elevated staff productiveness and mitigating safety dangers related to utilizing one-time photographs.

The answer described on this put up is geared in direction of machine studying (ML) engineers and platform groups who are sometimes liable for managing and standardizing {custom} environments at scale throughout a company. For particular person information scientists searching for a self-service expertise, we suggest that you just use the native Docker assist in SageMaker Studio, as described in Speed up ML workflows with Amazon SageMaker Studio Native Mode and Docker assist. This characteristic permits information scientists to construct, check, and deploy {custom} Docker containers instantly inside the SageMaker Studio built-in improvement atmosphere (IDE), enabling you to iteratively experiment along with your analytics environments seamlessly inside the acquainted SageMaker Studio interface.

Resolution overview

The next diagram illustrates the answer structure.

Solution Architecture

We deploy a pipeline utilizing AWS CodePipeline, which automates a {custom} Docker picture creation and attachment of the picture to a SageMaker area. The pipeline first checks out the code base from the GitHub repo and creates {custom} Docker photographs primarily based on the configuration declared within the config information. After efficiently creating and pushing Docker photographs to Amazon ECR, the pipeline validates the picture by scanning and checking for safety vulnerabilities within the picture. If no important or high-security vulnerabilities are discovered, the pipeline continues to the handbook approval stage earlier than deployment. After handbook approval is full, the pipeline deploys the SageMaker area and attaches {custom} photographs to the area routinely.

Stipulations

The stipulations for implementing the answer described on this put up embrace:

Deploy the answer

Full the next steps to implement the answer:

  1. Log in to your AWS account utilizing the AWS CLI in a shell terminal (for extra particulars, see Authenticating with short-term credentials for the AWS CLI).
  2. Run the next command to be sure to have efficiently logged in to your AWS account:
aws sts get-caller-identity

  1. Fork the the GitHub repo to your GitHub account .
  2. Clone the forked repo to your native workstation utilizing the next command:
  1. Log in to the console and create an AWS CodeStar connection to the GitHub repo within the earlier step. For directions, see Create a connection to GitHub (console).
  2. Copy the ARN for the connection you created.
  3. Go to the terminal and run the next command to cd into the repository listing:
cd streamline-sagemaker-custom-images-cicd

  1. Run the next command to put in all libraries from npm:
  1. Run the next instructions to run a shell script within the terminal. This script will take your AWS account quantity and AWS Area as enter parameters and deploy an AWS CDK stack, which deploys elements reminiscent of CodePipeline, AWS CodeBuild, the ECR repository, and so forth. Use an present VPC to setup VPC_ID export variable beneath. In case you don’t have a VPC, create one with at the least two subnets and use it.
export AWS_ACCOUNT=$(aws sts get-caller-identity --query Account --output textual content)
export AWS_REGION=
export VPC_ID=
export CODESTAR_CONNECTION_ARN=
export REPOSITORY_OWNER=

  1. Run the next command to deploy the AWS infrastructure utilizing the AWS CDK V2 and ensure to attend for the template to succeed:
cdk deploy PipelineStack --require-approval by no means

  1. On the CodePipeline console, select Pipelines within the navigation pane.
  2. Select the hyperlink for the pipeline named sagemaker-custom-image-pipeline.

Sagemaker custom image pipeline

  1. You may comply with the progress of the pipeline on the console and supply approval within the handbook approval stage to deploy the SageMaker infrastructure. Pipeline takes roughly 5-8 min to construct picture and transfer to handbook approval stage
  2. Await the pipeline to finish the deployment stage.

The pipeline creates infrastructure assets in your AWS account with a SageMaker area and a SageMaker {custom} picture. It additionally attaches the {custom} picture to the SageMaker area.

  1. On the SageMaker console, select Domains underneath Admin configurations within the navigation pane.

  1. Open the area named team-ds, and navigate to the Atmosphere

It is best to be capable to see one {custom} picture that’s connected.

How {custom} photographs are deployed and connected

CodePipeline has a stage referred to as BuildCustomImages that accommodates the automated steps to create a SageMaker {custom} picture utilizing the SageMaker Customized Picture CLI and push it to the ECR repository created within the AWS account. The AWS CDK stack on the deployment stage has the required steps to create a SageMaker area and connect a {custom} picture to the area. The parameters to create the SageMaker area, {custom} picture, and so forth are configured in JSON format and used within the SageMaker stack underneath the lib listing. Seek advice from the sagemakerConfig part in environments/config.json for declarative parameters.

Add extra {custom} photographs

Now you’ll be able to add your individual {custom} Docker picture to connect to the SageMaker area created by the pipeline. For the {custom} photographs being created, check with Dockerfile specs for the Docker picture specs.

  1. cd into the pictures listing within the repository within the terminal:
  1. Create a brand new listing (for instance, {custom}) underneath the pictures listing:
  1. Add your individual Dockerfile to this listing. For testing, you should utilize the next Dockerfile config:
FROM public.ecr.aws/amazonlinux/amazonlinux:2
ARG NB_USER="sagemaker-user"
ARG NB_UID="1000"
ARG NB_GID="100"
RUN yum replace -y && 
    yum set up python3 python3-pip shadow-utils -y && 
    yum clear all
RUN yum set up --assumeyes python3 shadow-utils && 
    useradd --create-home --shell /bin/bash --gid "${NB_GID}" --uid ${NB_UID} ${NB_USER} && 
    yum clear all && 
    python3 -m pip set up jupyterlab
RUN python3 -m pip set up --upgrade pip
RUN python3 -m pip set up --upgrade urllib3==1.26.6
USER ${NB_UID}
CMD jupyter lab --ip 0.0.0.0 --port 8888 
--ServerApp.base_url="/jupyterlab/default" 
--ServerApp.token='' 
--ServerApp.allow_origin='*'

  1. Replace the pictures part within the json file underneath the environments listing so as to add the brand new picture listing identify you’ve got created:
"photographs": [
      "repositoryName": "research-platform-ecr",
       "tags":[
         "jlab",
         "custom" << Add here
       ]
      }
    ]

  1. Replace the identical picture identify in customImages underneath the created SageMaker area configuration:
"customImages":[
          "jlab",
          "custom" << Add here
 ],

  1. Commit and push adjustments to the GitHub repository.
  2. It is best to see CodePipeline is triggered upon push. Comply with the progress of the pipeline and supply handbook approval for deployment.

After deployment is accomplished efficiently, you need to be capable to see that the {custom} picture you’ve got added is connected to the area configuration (as proven within the following screenshot).

Custom Image 2

Clear up

To wash up your assets, open the AWS CloudFormation console and delete the stacks SagemakerImageStack and PipelineStack in that order. In case you encounter errors reminiscent of “S3 Bucket just isn’t empty” or “ECR Repository has photographs,” you’ll be able to manually delete the S3 bucket and ECR repository that was created. Then you’ll be able to retry deleting the CloudFormation stacks.

Conclusion

On this put up, we confirmed learn how to create an automatic steady integration and supply (CI/CD) pipeline resolution to construct, scan, and deploy {custom} Docker photographs to SageMaker Studio domains. You need to use this resolution to advertise consistency of the analytical environments for information science groups throughout your enterprise. This strategy helps you obtain machine studying (ML) governance, scalability, and standardization.


Concerning the Authors

Muni Annachi, a Senior DevOps Marketing consultant at AWS, boasts over a decade of experience in architecting and implementing software program methods and cloud platforms. He makes a speciality of guiding non-profit organizations to undertake DevOps CI/CD architectures, adhering to AWS finest practices and the AWS Effectively-Architected Framework. Past his skilled endeavors, Muni is an avid sports activities fanatic and tries his luck within the kitchen.

Ajay Raghunathan is a Machine Studying Engineer at AWS. His present work focuses on architecting and implementing ML options at scale. He’s a expertise fanatic and a builder with a core space of curiosity in AI/ML, information analytics, serverless, and DevOps. Exterior of labor, he enjoys spending time with household, touring, and taking part in soccer.

You might also like

Bringing which means into expertise deployment | MIT Information

Google for Nonprofits to develop to 100+ new international locations and launch 10+ new no-cost AI options

NVIDIA CEO Drops the Blueprint for Europe’s AI Growth

Arun Dyasani is a Senior Cloud Software Architect at AWS. His present work focuses on designing and implementing progressive software program options. His position facilities on crafting sturdy architectures for complicated functions, leveraging his deep information and expertise in growing large-scale methods.

Shweta Singh is a Senior Product Supervisor within the Amazon SageMaker Machine Studying platform staff at AWS, main the SageMaker Python SDK. She has labored in a number of product roles in Amazon for over 5 years. She has a Bachelor of Science diploma in Pc Engineering and a Masters of Science in Monetary Engineering, each from New York College.

Jenna Eun is a Principal Observe Supervisor for the Well being and Superior Compute staff at AWS Skilled Companies. Her staff focuses on designing and delivering information, ML, and superior computing options for the general public sector, together with federal, state and native governments, educational medical facilities, nonprofit healthcare organizations, and analysis establishments.

Meenakshi Ponn Shankaran is a Principal Area Architect at AWS within the Information & ML Skilled Companies Org. He has intensive experience in designing and constructing large-scale information lakes, dealing with petabytes of knowledge. At the moment, he focuses on delivering technical management to AWS US Public Sector purchasers, guiding them in utilizing progressive AWS companies to fulfill their strategic aims and unlock the complete potential of their information.

Tags: AmazonapproachautomatedCICDcustomenvironmentpipelineprovisioningSageMakerStreamlineStudio
Previous Post

Cloud Community Safety: Your Migration Guidelines Made Easy

Next Post

10 Prime Ladies in AI in 2025

Md Sazzad Hossain

Md Sazzad Hossain

Related Posts

Bringing which means into expertise deployment | MIT Information
Machine Learning

Bringing which means into expertise deployment | MIT Information

by Md Sazzad Hossain
June 12, 2025
Google for Nonprofits to develop to 100+ new international locations and launch 10+ new no-cost AI options
Machine Learning

Google for Nonprofits to develop to 100+ new international locations and launch 10+ new no-cost AI options

by Md Sazzad Hossain
June 12, 2025
NVIDIA CEO Drops the Blueprint for Europe’s AI Growth
Machine Learning

NVIDIA CEO Drops the Blueprint for Europe’s AI Growth

by Md Sazzad Hossain
June 14, 2025
When “Sufficient” Nonetheless Feels Empty: Sitting within the Ache of What’s Subsequent | by Chrissie Michelle, PhD Survivors Area | Jun, 2025
Machine Learning

When “Sufficient” Nonetheless Feels Empty: Sitting within the Ache of What’s Subsequent | by Chrissie Michelle, PhD Survivors Area | Jun, 2025

by Md Sazzad Hossain
June 10, 2025
Decoding CLIP: Insights on the Robustness to ImageNet Distribution Shifts
Machine Learning

Apple Machine Studying Analysis at CVPR 2025

by Md Sazzad Hossain
June 14, 2025
Next Post
10 Prime Ladies in AI in 2025

10 Prime Ladies in AI in 2025

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recommended

Gemini 2.5’s native audio capabilities

Gemini 2.5’s native audio capabilities

June 5, 2025
Machine Studying 101 P8: Logistic Regression | by Dangle Nguyen | Feb, 2025

Machine Studying 101 P8: Logistic Regression | by Dangle Nguyen | Feb, 2025

February 19, 2025

Categories

  • Artificial Intelligence
  • Computer Networking
  • Cyber Security
  • Data Analysis
  • Disaster Restoration
  • Machine Learning

CyberDefenseGo

Welcome to CyberDefenseGo. We are a passionate team of technology enthusiasts, cybersecurity experts, and AI innovators dedicated to delivering high-quality, insightful content that helps individuals and organizations stay ahead of the ever-evolving digital landscape.

Recent

Dutch police determine customers as younger as 11-year-old on Cracked.io hacking discussion board

Dutch police determine customers as younger as 11-year-old on Cracked.io hacking discussion board

June 15, 2025

Ctrl-Crash: Ny teknik för realistisk simulering av bilolyckor på video

June 15, 2025

Search

No Result
View All Result

© 2025 CyberDefenseGo - All Rights Reserved

No Result
View All Result
  • Home
  • Cyber Security
  • Artificial Intelligence
  • Machine Learning
  • Data Analysis
  • Computer Networking
  • Disaster Restoration

© 2025 CyberDefenseGo - All Rights Reserved

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In