Feel at home and work fast no matter which host you're working on.
Remember you can set up Conda via something like the following Bash snippet available as a Gist when on Linux:
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh &&
bash miniconda.sh -b -u -p "${HAFH:-${HOME}}/miniconda3" &&
"${HAFH:-${HOME}}"/miniconda3/bin/conda init bash &&
export PATH="${HAFH:-${HOME}}/miniconda3/bin:${PATH}" &&
rm -rf miniconda.shRemember that you want to also create a main environment to keep the base Conda environment clean:
conda create --name main --clone base --copyWhen spinning up a new machine, you need to set up SSH keys to authenticate with GitHub
- Create a new SSH public-private key pair:
ssh-keygen -t ed25519 -C "anilkeshwani@hotmail.com" &&
cat "${HOME}/.ssh/id_ed25519.pub"Common scripts centralised here for use agnostic of machine.
Note
Source: Set up local Visual Studio Code, specifically Method 3: Connect from the terminal via SSH CLI.
Make the script executable:
chmod +x /path/to/sagemaker_connect.shConfigure $HOME/.ssh/config to add the following entry:
Host space-name
HostName 'arn:PARTITION:sagemaker:us-east-1:111122223333:space/domain-id/space-name'
ProxyCommand '/path/to/sagemaker_connect.sh' '%h' AWS_PROFILE_NAME
ForwardAgent yes
AddKeysToAgent yes
StrictHostKeyChecking accept-newBreakdown of the HostName:
- 'arn:PARTITION:sagemaker:us-east-1:111122223333:space/domain-id/space-name'
For example, the PARTITION can be aws.
If you need to use a named AWS credential profile, change the proxy command as follows:
ProxyCommand '/path/to/sagemaker_connect.sh' '%h' YOUR_CREDENTIAL_PROFILE_NAMEConnect via SSH or run SCP command:
ssh space-name
scp file_abc space-name:/tmp/