Red Cloud Linux GPU PyTorch

Note

These instructions were tested 2024-02-27 using the Ubuntu 22 LTS image with the c4.t1.m20 vm flavor.

1. Launch a GPU instance

Instance configuration

  1. Details: Choose a name
  2. Source: Image:ubuntu-22.04-LTS, Volume Size 100GB
  3. Flavor: c4.t1.m20
  4. Networks: <your choice>
  5. Security Groups: <your choice, as appropriate>
  6. Key Pair: <choose your key>

2. Set up an admin user

Create an admin account following https://cac.cornell.edu/techdocs/clusterinfo/linuxtutorial/#ubuntu, finishing with sudo apt update and sudo apt upgrade

3. Install NVIDIA Drivers

sudo apt install libnvidia-common-535 libnvidia-gl-535 nvidia-driver-535
sudo reboot now

4. Install Miniconda

Miniconda — Conda documentation

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh

bash Miniconda3-latest-Linux-x86_64.sh
#with ~/miniconda3 as install location
source ~/.bashrc

5. Create a conda environment

Add any other packages you might need to the mamba install .... line. Minimally, you need python, pip and pytorch. At the time of this writing, mamba selected python 3.11 over 3.12. You can try leaving the python version unconstrained and see what mamba selects. Be sure you are getting a CUDA enabled version of pytorch.

conda config --set channel_priority strict  
conda create --name cforge  
conda activate cforge  
conda config --add channels conda-forge  
conda config --env --set channel_priority strict

conda install mamba

mamba install python=3.11 pip pandas matplotlib jupyterlab nodejs tqdm regex ipywidgets jupytext pytorch