本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
建立生命週期組態,將儲存庫複製到程式碼編輯器應用程式
本節說明如何複製儲存庫,並建立已連接生命週期組態的程式碼編輯器應用程式。
-
從您的本機電腦中,使用以下內容建立名為
my-script.sh的檔案:#!/bin/bash set -eux -
在生命週期組態指令碼中複製您選擇的儲存庫。
export REPOSITORY_URL="https://github.com/aws-samples/sagemaker-studio-lifecycle-config-examples.git" git -C/home/sagemaker-userclone $REPOSITORY_URL -
在完成指令碼之後,請建立並連接生命週期組態。如需詳細資訊,請參閱在 Studio 中建立和連接生命週期組態。
-
建立已連接生命週期組態的程式碼編輯器應用程式。
aws sagemaker create-app \ --domain-iddomain-id\ --space-namespace-name\ --app-typeCodeEditor\ --app-namedefault\ --resource-spec "SageMakerImageArn=arn:aws:sagemaker:region:image-account-id:image/sagemaker-distribution-cpu,LifecycleConfigArn=arn:aws:sagemaker:region:user-account-id:studio-lifecycle-config/my-code-editor-lcc,InstanceType=ml.t3.large"如需可用程式碼編輯器映像 ARN 的詳細資訊,請參閱 程式碼編輯器應用程式執行個體和映像。