Skip to content

Getting Started in the Lab

lisahou888 edited this page Feb 28, 2019 · 4 revisions

Log In

SSH

SSH into the server using PSC username and password (might be different from your xsede username, check your email for details)

ssh <username>@bridges.psc.xsede.org

Go to your designated folder /pylon5/ac5616p/[your username].

Install Anaconda3

wget https://repo.anaconda.com/archive/Anaconda3-2018.12-Linux-x86_64.sh
chmod +x Anaconda3-2018.12-Linux-x86_64.sh
./Anaconda3-2018.12-Linux-x86_64.sh

Note that you should put anaconda3 in your designated folder (/pylon5/ac5616p/[your username]), not the root folder. Follow the instructions from the script.

Install python

Python 3 comes with anaconda3. To use the python you just installed (instead of the default on the server), logout and log yourself in again. Type: which python

And it should give you /pylon5/ac5616p/[username]/anaconda3/bin/python

IF NOT, you need to add anaconda3 to your .bash_profile.

vim ~/.bash_profile

and add the following line before EXPORT PATH.

export PATH=/pylon5/ac5616p/<username>/anaconda3/bin:$PATH

Exit vim and type source ~/.bash_profile.

Now when you type which python again, it should give you the desired result.

(Otherwise, log out and log yourself back in)

Install pytorch

conda install pytorch torchvision cudatoolkit=9.0 -c pytorch

To test if you install pytorch successfully, import torch through python command line (python3) and you shouldn't see any errors.

Launch Jupyter Notebook

Jupyter notebook comes with Anaconda3. You can run jupyter notebook to launch it. If you export the current path to ~/.bash_profile, you shouldn't see any errors.

To have a local visualization of your notebook, you need to run the script from here to your folder.

And run bash <name_of_script>.sh. The script will give you instructions on how to open jupyter notebook in your local browser. When the browser asks for the password, use the token the script returns you (the part after token=).

Work with GPU-AI

Detailed information can be found here

If you use exit to log yourself out, you will notice you end the GPU session. Instead, use logout to log out without intervening the session.