Skip to content

anilkeshwani/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotfiles

Feel at home and work fast no matter which host you're working on.

Conda

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.sh

Remember that you want to also create a main environment to keep the base Conda environment clean:

conda create --name main --clone base --copy

SSH Keys

When spinning up a new machine, you need to set up SSH keys to authenticate with GitHub

  1. Create a new SSH public-private key pair:
ssh-keygen -t ed25519 -C "anilkeshwani@hotmail.com" &&
    cat "${HOME}/.ssh/id_ed25519.pub"
  1. Add the public key as a new SSH key on GitHub

Scripts

Common scripts centralised here for use agnostic of machine.

SageMaker Connect (sagemaker_connect.sh)

Make the script executable:

chmod +x /path/to/sagemaker_connect.sh

Configure $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-new

Breakdown 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_NAME

Connect via SSH or run SCP command:

ssh space-name
scp file_abc space-name:/tmp/

About

Feel at home and work fast no matter which host you're working on.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published