Skip to content

Instantly share code, notes, and snippets.

@Melonangie
Last active February 20, 2025 14:01
Show Gist options
  • Save Melonangie/b3286f3550fb63d931699c4f31c70907 to your computer and use it in GitHub Desktop.
Save Melonangie/b3286f3550fb63d931699c4f31c70907 to your computer and use it in GitHub Desktop.
Pre-setup M15 R6 Nvidia for Data Science

Pre-Install

Install Ubuntu

sudo apt -y update && sudo apt -y upgrade && sudo apt -y autoremove
sudo apt -y install kitty
mkdir ~/.config/kitty
wget -P ~/.config/kitty/ https://gist.githubusercontent.com/Melonangie/6b1a55a6ff08311d126a41cee4516f6d/raw/f2418531d2b594dc1f79b75a7b04467b402e06ff/kitty.conf
wget -P ~/.config/kitty/ https://raw.githubusercontent.com/mbadolato/iTerm2-Color-Schemes/db227d159adc265818f2e898da0f70ef8d7b580e/kitty/synthwave.conf
mkdir ~/.fonts
fc-cache -f -v
sudo apt -y install zsh curl git
chsh -s $(which zsh)
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
sudo apt -y install build-essential procps file
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
touch ~/.zprofile && (echo; echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> ~/.zprofile

brew install gcc zsh-autosuggestions zsh-autocomplete zsh-completions zsh-history-substring-search zsh-syntax-highlighting ccat the_silver_searcher scmpuff thefuck neovim tig diff-so-fancy powerlevel10k

source /home/linuxbrew/.linuxbrew/share/powerlevel10k/powerlevel10k.zsh-theme
touch ~/.zshenv && echo 'export ZSH_HIGHLIGHT_HIGHLIGHTERS_DIR=/home/linuxbrew/.linuxbrew/share/zsh-syntax-highlighting/highlighters' >>  ~/.zshenv && echo 'skip_global_compinit=1' >>  ~/.zshenv
wget -P ~/ https://gist.githubusercontent.com/Melonangie/6e5a6e1cbbc7279520d95d4f20ed5957/raw/f247947fc6d5174d812d561097409268ced01eef/.ignore 
wget -P ~/ https://gist.githubusercontent.com/Melonangie/6e5a6e1cbbc7279520d95d4f20ed5957/raw/f247947fc6d5174d812d561097409268ced01eef/.ignore -O .gitignore
wget -P ~/ https://gist.githubusercontent.com/Melonangie/803a3867a67f9dadd637b343a3ea8d54/raw/3f4af12c89220dcd08066d3365eadc97946902fa/.gitconfig
source ~/.zshrc
rm -f ~/.zcompdump; compinit
  • Update ~/.zshrc
ENABLE_CORRECTION="true"
...
plugins=(
alias-finder 
colored-man-pages
command-not-found
fancy-ctrl-z
nvm
thefuck
virtualenv
zsh-autosuggestions
)
...

eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
eval "$(scmpuff init -s)"
eval $(thefuck --alias)

# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh

# alias-finder plugin
zstyle ':omz:plugins:alias-finder' autoload yes # disabled by default
zstyle ':omz:plugins:alias-finder' longer yes # disabled by default
zstyle ':omz:plugins:alias-finder' exact yes # disabled by default
zstyle ':omz:plugins:alias-finder' cheaper yes # disabled by default
ZSH_AUTOSUGGEST_STRATEGY=(history completion)
alias vim='nvim'
alias cat="ccat --bg=dark "
alias ag='ag --path-to-ignore ~/.ignore'
alias grep='grep -R -n -H -C 5 --exclude-dir={.git,.svn,CVS} '
alias hgrep="fc -El 0 | grep"
alias h='history'
alias l='ls -lFh'
alias ll='ls -lAFh'
alias ff='find . -type f -name'

export PATH=$HOME/.local/bin:$PATH
export PATH=/home/linuxbrew/.linuxbrew/bin:$PATH

export PATH=/usr/local/cuda/bin:$PATH
export PATH=/usr/local/cuda-12.8/bin${PATH:+:${PATH}}
export CUDA_HOME=/usr/local/cuda

export ZSH_HIGHLIGHT_HIGHLIGHTERS_DIR=/home/linuxbrew/.linuxbrew/share/zsh-syntax-highlighting/highlighters

source /home/linuxbrew/.linuxbrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source /home/linuxbrew/.linuxbrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh
source /home/linuxbrew/.linuxbrew/share/zsh-history-substring-search/zsh-history-substring-search.zsh
source /home/linuxbrew/.linuxbrew/share/powerlevel10k/powerlevel10k.zsh-theme
source ~/miniconda3/bin/activate

  if type brew &>/dev/null; then
    FPATH=$(brew --prefix)/share/zsh-completions:$FPATH
    autoload -Uz compinit
    compinit
  fi
rm -f ~/.zcompdump; compinit
chmod go-w '/home/linuxbrew/.linuxbrew/share'
chmod -R go-w '/home/linuxbrew/.linuxbrew/share/zsh'
  • source ~/.zshrc
mkdir -p ~/miniconda3
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
rm ~/miniconda3/miniconda.sh
source ~/miniconda3/bin/activate
conda init --all

Next Steps

Install Nvidia GPU Tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment