Skip to content

Commit

Permalink
updated to work with the sagemaker PR container image
Browse files Browse the repository at this point in the history
  • Loading branch information
azograby committed May 7, 2024
1 parent 1aaaaa2 commit f289e26
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions use-cases/text-to-image-fine-tuning/kohya-ss-fine-tuning.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -171,29 +171,29 @@
},
"outputs": [],
"source": [
"import os\n",
"%%sh\n",
"\n",
"# Initial configuration for accessing CodeCommit. Reference: https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-git-remote-codecommit.html\n",
"\n",
"# Install latest pip version\n",
"!curl -O https://bootstrap.pypa.io/get-pip.py\n",
"!python3 get-pip.py --user\n",
"curl -O https://bootstrap.pypa.io/get-pip.py\n",
"python3 get-pip.py --user\n",
"\n",
"# # Install git-remote-codecommit\n",
"!pip install git-remote-codecommit\n",
"pip install git-remote-codecommit\n",
"\n",
"# Clone the CodeCommit repository\n",
"!git clone codecommit::us-west-2://${CODECOMMIT_REPO_NAME} /home/sagemaker-user/${CODECOMMIT_REPO_NAME}\n",
"git clone codecommit::us-west-2://$CODECOMMIT_REPO_NAME /home/sagemaker-user/$CODECOMMIT_REPO_NAME\n",
"\n",
"# Change directories to the newly cloned repo\n",
"os.chdir(\"/home/sagemaker-user/\" + os.environ[\"CODECOMMIT_REPO_NAME\"])\n",
"cd /home/sagemaker-user/$CODECOMMIT_REPO_NAME\n",
"\n",
"# Copy the \"code\" directory files from the amazon-sagemaker-examples repository to the new git repository\n",
"# We will add files to the new git repository and commit the changes to the CodeCommit repository in our AWS account\n",
"!cp -r ~/$LOCAL_CODE_BASE_PATH/code/* /home/sagemaker-user/$CODECOMMIT_REPO_NAME\n",
"!git add .\n",
"!git -c user.name=Author -c user.email=author@example.com commit -m \"initial commit\"\n",
"!git push origin master:main"
"cp -r ~/$LOCAL_CODE_BASE_PATH/code/* /home/sagemaker-user/$CODECOMMIT_REPO_NAME\n",
"git add .\n",
"git -c user.name=Author -c user.email=author@example.com commit -m \"initial commit\"\n",
"git push origin master:main"
]
},
{
Expand Down

0 comments on commit f289e26

Please sign in to comment.