COMP 5500/4600: Deep Learning for NLP -- Spring 2025

How to connect to UML GPUs?

Preferred way is you connect to this server with VSCode IDE. Connecting through VSCode makes it easy to work on the python files (especially the notebooks) hosted on a server.

  • Download VSCode: VSCode Download
  • On your local machine (your personal computer or laptop) create a `.ssh` folder in your home directory, if it's not there.
  • Go to `~/.ssh` from the terminal, type `nano config`, and paste the following snippet in the file:

        Host cs-gpu1
            HostName 10.77.3.20
            User <Your-CS-Username>
            
  • Open VSCode, go to the vertical panel on the leftmost part of the window, and select the `Remote Explorer` icon (it looks like a screen with triangular brackets).
  • You must be able to see `cs-gpu1` in the dropdown list of SSH remotes.
  • Connect to `cs-gpu1` and open a new terminal.
  • Very Important - Once you open the terminal, go to:
    cd /home/public
  • If you do not see a folder with your `cs-username`, create one:
    mkdir <Your-CS-Username>

How to setup Miniconda on the server?

If you are working on `cs-gpu1`, please follow these guidelines:

Create your own directory at `/home/public/` to store Miniconda and your trained models:


        mkdir /home/public/$(your_cs_username)
        cd /home/public/$(your_cs_username)
        nano install_miniconda.sh
            

Paste the following lines into `install_miniconda.sh`:


        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 -rf ~/miniconda3/miniconda.sh
        ./miniconda3/bin/conda init bash
        ./miniconda3/bin/conda init zsh
            

Run the following commands:


        chmod +x ./install_miniconda.sh
        ./install_miniconda.sh
            

Sourcing conda:

Create a `source_conda.sh` file in your `/home/public/your_cs_name/` directory:


        source /home/public/your_cs_name/miniconda3/etc/profile.d/conda.sh
        conda activate base
            

Edit your bashrc:

Then open your bashrc file (located at: `/usr/cs/grad/doc/your_cs_name/.bashrc`) and add the following lines:


        # source conda
        source /home/public/your_cs_name/source_conda.sh

        # changing cache folders
        export WANDB_CACHE_DIR='/home/public/your_cs_name/.cache/wandb'
        export HF_HOME='/home/public/your_cs_name/.cache/huggingface'
        export HUGGINGFACE_HUB_CACHE="$HF_HOME/hub"
            

Double check that everything is set up:

  • Disconnect and connect again
  • Run:
    source ~/.bashrc
  • Run:
    which conda
    and make sure it shows the path as:
    /home/public/your_cs_name/miniconda3/bin/conda

Setting up your GitHub account

Follow these steps to set up Git with your account:

  • Set your username and email address:

            git config --global user.name "Your Name"
            git config --global user.email "your-email@example.com"
                
  • Verify your configuration:
    git config --global --list
  • Generate an SSH Key:
    ssh-keygen -t ed25519 -C "your-email@example.com"
  • Press Enter to save it in the default location (~/.ssh/id_ed25519).
  • Set a passphrase (optional, but recommended).
Adding the SSH key to GitHub
  • Copy your SSH key:
    cat ~/.ssh/id_ed25519.pub
  • Go to GitHub → SettingsSSH and GPG keys.
  • Click "New SSH key".
  • Paste the copied key and save it.
  • Verify the SSH connection:
    ssh -T git@github.com