-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Sean Smith <[email protected]>
- Loading branch information
1 parent
daca11f
commit 0967936
Showing
11 changed files
with
24 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 0 additions & 32 deletions
32
1.architectures/5.sagemaker-hyperpod/LifecycleScripts/base-config/initsmhp.sh
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
1.architectures/5.sagemaker-hyperpod/LifecycleScripts/base-config/initsmhp/fix-profile.sh
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
...tectures/5.sagemaker-hyperpod/LifecycleScripts/base-config/initsmhp/gen-keypair-ubuntu.sh
This file was deleted.
Oops, something went wrong.
30 changes: 0 additions & 30 deletions
30
...chitectures/5.sagemaker-hyperpod/LifecycleScripts/base-config/initsmhp/howto-miniconda.sh
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
...sagemaker-hyperpod/LifecycleScripts/base-config/initsmhp/install-git-remote-codecommit.sh
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
...hitectures/5.sagemaker-hyperpod/LifecycleScripts/base-config/initsmhp/install-mount-s3.sh
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
1.architectures/5.sagemaker-hyperpod/LifecycleScripts/base-config/initsmhp/install-pkgs.sh
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...chitectures/5.sagemaker-hyperpod/LifecycleScripts/base-config/utils/gen-keypair-ubuntu.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
set -exuo pipefail | ||
|
||
mkdir -p /fsx/ubuntu/.ssh | ||
cd /fsx/ubuntu/.ssh | ||
{ test -f id_rsa && grep "^$(cat id_rsa.pub)$" authorized_keys &> /dev/null ; } && GENERATE_KEYPAIR=0 || GENERATE_KEYPAIR=1 | ||
if [[ $GENERATE_KEYPAIR == 1 ]]; then | ||
echo Generate a new keypair... | ||
ssh-keygen -t rsa -q -f id_rsa -N "" | ||
cat id_rsa.pub >> authorized_keys | ||
# Set permissions for the ssh keypair | ||
chmod 600 id_rsa | ||
chmod 644 id_rsa.pub | ||
# Set permissions for the .ssh directory | ||
chmod 700 /fsx/ubuntu/.ssh | ||
# Change ownership to the ubuntu user | ||
chown ubuntu:ubuntu id_rsa id_rsa.pub authorized_keys | ||
chown ubuntu:ubuntu /fsx/ubuntu/.ssh | ||
else | ||
echo Use existing keypair... | ||
fi |
File renamed without changes.