Skip to content

Instantly share code, notes, and snippets.

@philschmid
Last active August 15, 2022 19:29
Show Gist options
  • Select an option

  • Save philschmid/68efbb406104f0613c7c8004aef152f2 to your computer and use it in GitHub Desktop.

Select an option

Save philschmid/68efbb406104f0613c7c8004aef152f2 to your computer and use it in GitHub Desktop.
# Setup Ubuntu
sudo apt update --yes
sudo apt upgrade --yes
# Get Miniconda and make it the main Python interpreter
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh
bash ~/miniconda.sh -b -p ~/miniconda
rm ~/miniconda.sh
export PATH=~/miniconda/bin:$PATH
# config git credentials
git config --global user.name "<USERNAME>"
git config --global user.email "<EMAIL>"
# create conda environment for GPU development
conda create --channel=conda-forge --name dev \
python=3.9 \
nvidia::cudatoolkit=11.3 \
pytorch::pytorch=1.11.0=py3.9_cuda11.3_cudnn8.2.0_0 \
mpi4py=3.0
# init
conda init bash
exec bash
# activate environment
conda activate dev
# install python packages
pip install transformers datasets ...
# be happy ๐Ÿ˜Š๐Ÿš€
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment