Server Management


VPN using Ubuntu

$ sudo openfortivpn vpn.cshl.edu:443 -u [username] –trusted-cert [token]

ssh to server

$ ssh [username]@[server-ip]

Jupyter notebook

Terminal on remote machine

$ jupyter notebook –no-browser –port=8080

Terminal on local machine

$ ssh -N -L 8080:localhost:8080 [username]@[server-ip]

Browser on local machine (need token from jupyter notebook on remote machine)

$ localhost:8080

GPU management

Check processes on gpu

$ nvidia-smi

kill process on gpu

$ sudo kill -9 [PID]

Run a job on a specific GPU

$ CUDA_VISIBLE_DEVICES=[gpu] python3 [script.py]

Setup environment for Tensorflow-gpu with cuda and cudnn

Using pip or anaconda