Connecting to our hardware

This page detailas how to connect to the various servers, storage devices etc you will need

The Computational Server

Our main computational server is situated in Simon's office and snappily named: simon-HP-Z6-G4-Workstation. This is a 72 Core (2.3GHz) Intel Xeon workstation with 64GB of RAM running Ubuntu. Everyone doing computational work will be given an ssh user on this machine, let Simon know if you haven't been given one.

You can connect to the server using SSH from any machine in BSMS (and potentially when on the Sussex VPN). If the VPN does not work try accessing your BSMS machine using Team Viewer and then running ssh from there.

ssh [email protected]

You should be able to launch graphical applications, such as MATLAB remotely using

ssh -X [email protected]

If you are using Mac OSX you're best using XQuartz to launch graphical applications on the server https://www.xquartz.org/. If you are using Windows, Cygwin/X provides this functionality https://x.cygwin.com/.

You may find connecting to the server using the computer name rather than the IP is more successful, so try [email protected] in place of any IP addresses on this page.

Using FTP to download files from the server

Your SSH logins will also allow you to have sFTP access to the servers. I recommend using FileZilla. You will need to use the SFTP protocol, and the same username and password you usually use to FTP into the server, so your settings will look like this:

FTP settings for FileZilla. Add these to your site manager to remember them

Using Chrome Remote Desktop to connect remotely

Note: setup must be done from campus for the first time. Follow the instrutions here: https://remotedesktop.google.com/headless

Briefly:

  • Navigate to https://remotedesktop.google.com/headless in Firefox or chrome on your laptop/remote machine, and log in with a Google account you want to use to access the server.

  • simultaneously ssh into the server in a terminal (as described above, ssh [email protected])

  • install chrome remote desktop sudo dpkg -i chrome-remote-desktop_current_amd64.deb

  • if you get an error due to unmet dependencies run sudo apt-get -f install then try again sudo dpkg -i chrome-remote-desktop_current_amd64.deb

  • hit next and authorize on the web page https://remotedesktop.google.com/headless

  • Copy the command displayed on the web pageunder Debian Linux, which should look something like this: DISPLAY= /opt/google/chrome...

  • paste this command into the ssh window, it will ask for a 6 digit pin, which you should enter twice.

  • When prompted with: [sudo] password for [username]: You need to enter your password for your user on the server.

  • You are done, head to the below link: https://remotedesktop.google.com/access Click on simon-HP-Z6-G4-Workstation and enter the pin you chose above. You probably want to tick 'remember the pin on this device'.

  • Click ok on the gray pop-up window to launch the default XSession

  • If you want to access jupyter hub from the server itself you need to put the below IP into the web browser (Firefox) on the server, and then login with your username and password on the server: 127.0.0.1:8000

Note: you cannot be simulateously logged in with multiple graphical sessions so if you are logged into the server with ssh -X your chrome remote desktop session will not work. Close any active graphical sessions before using Chrome Remote Desktop.

Running your Julia Notebooks on the Server

Preferred: Using Jupyter Hub

Point a web browser to port 8000 of the IP of the server: http://139.184.170.218:8000

Login with your ssh username and password for the server. You should then see your home folder in the Jupyer Notebook browser and can launch Julia notebooks from there.

If you have mounted the NAS in your home director as described below you should be able to navigate to your folder on the NAS. If you have the synology software synchronising your changes from your laptop to the NAS you should be able to see all your code there.

Problems and solutions

If Julia isn't installed on the server:

  • Copy the link to the latest version of Julia from the Julia Downloads Page, use the glibc Linux link highlighted below.

  • ssh into the server.

  • unzip the file tar xzvf julia-1.8.5-linux-x86_64.tar.gz

  • open your bashrc file in a text editor nano ~/.bashrc

  • Add julia to your path, by adding the following line to the bottom of your bashrc file: export PATH="$PATH:/home/simon/julia-1.8.5/bin" Note you will nee to change your username and julia version.

  • Save your changes and close the text editor (CTRL+O followed by CTRL+X in nano).

  • Use the line command below to make the changes live: source ~/.bashrc

  • Check julia is installed by typing: julia

  • You probably now want to install the Julia kernal in python notebooks as shown below.

If you don't have Julia showing as an available language for a new notebook first login to the server:

  • SSH into the server

  • launch julia with the 'julia' command

  • add julia support to Jupyter notebook with the following command: using Pkg Pkg.add("IJulia")

If you try and do multithreading but only get one thread

  • SSH into the server

  • launch julia with the 'julia' command

  • create a new julia kernel with an environment variable setting the number of threads (there are 72 cores on the server so chose a number close to, but slightly less than, 72): using IJulia IJulia.installkernel("Julia 64 threads",env=Dict( "JULIA_NUM_THREADS"=>"64" ))

If JupyterHub is not working

If JupyterHub is not running (perhaps the server has been restarted), you need to relaunch it.

  • SSH into the server

  • launch jupyter hub:

    cd /etc/jupyterhub
    $ sudo -u rhea jupyterhub --JupyterHub.spawner_class=sudospawner.SudoSpawner

To add new users to Jupyterhub:

  • add the user to the server: sudo adduser johndoe

  • then add the user to the sudoers file as a user able to use jupyterhub sudo visudo /etc/sudoers

  • Add their name to the RunasAlias as shown below: Runas_Alias JUPYTER_USERS = rhea, simon,..., johndoe

Alternative: Connecting to the server with port forwarding

This is more difficult, talk to Simon if trying this approach. Rather than doing all your development on the server, it is possible to develop locally and execute remotely on the server. You can run your Julia Notebooks on the server so that the Julia kernel is run on the server to make the most of the available computing power. To achieve this follow the below steps: Note: You may first (before step 1) need to install Anaconda to your user on the server as each installation of Anaconda is stored in the user's home folder. You may need to add the Julia kernal to the iPython environment as well.

  1. ssh into the server ssh [email protected]

  2. launch jupyter without a browser front-end ./anaconda3/bin/jupyter notebook --no-browser

  3. On your local machine/laptop in a new terminal, forward the port used by jupyter notebook to the server ssh -L 8888:localhost:8888 [email protected]

  4. Now launch a web browser and go to http://localhost:8888

You may be asked for a password, in which case follow the steps here: https://jupyter-notebook.readthedocs.io/en/stable/public_server.html

Network Attached Storage

We have a Synology NAS DS1520+ with around 20TB of storage available at http://mitchelllabnas.quickconnect.to or http://139.184.169.71:5000/

You should have a username and password to connect. You will have a user folder in volume1/General which you have write access too. You also have read-only access to the other user folders. There is also a shared folder we all have read and write access to to enable us to send things to each other easily.

You can mount the NAS on your laptop/desktop as if it is a local hard disk drive.

  • on Mac OSX open Finder, and in the menu at the top Go > Connect to server and enter afp://MitchellLabNas.localYou will then be asked for your NAS username and password, which you should know, if you don't, ask Simon.

  • On Windows, enter the following address into Windows Explorer \\MitchellLabNas

  • From Linux, follow the below instructions on Mounting the NAS on the server.

Backup your work to the NAS at least once a week!

This can be automated and scheduled using the Synology Drive Client available here: https://www.synology.com/en-uk/support/download/DS1520+#utilities

Mounting the NAS on the server

If you wish to read-and-write from your user folder on the NAS, while running your computational jobs on the server you can mount the NAS from the server using the following command:

cd ~

mkdir synology

sudo mount -t nfs 139.184.169.71:/volume1/General/<your username> ~/synology/ replace <your username> above with your username for example:

sudo mount -t nfs 139.184.169.71:/volume1/General/simon ~/synology/

cd synology

Alternatively the server should already be mounted in /mnt/Synology/<your username>

BinderHub for teaching.

Binderhub provides each student with a small computing environment for teaching purposes on the server (http://139.184.170.218:8005). It works exactly the same as https://mybinder.org/ and both can be used interchangeably. To start our binder service on the server the key commands are: cd /media/simon/ssd2/binderhub

helm upgrade teaching jupyterhub/binderhub --version=0.2.0-n880.hd19a36a --namespace=teaching -f secret.yaml -f config.yaml

kubectl port-forward --address 139.184.170.218 service/binder 8005:80 --namespace=teaching

Then in a new shell:

sudo microk8s.kubectl port-forward --address 139.184.170.218 service/proxy-public 8006:80 --namespace=teaching

Now Binderhub should be accessible at 139.184.170.218:8005 🙏

Sussex Staff VPN

Sussex staff (which is everyone in the lab apart from PhD students, can connect to the Sussex Staff VPN in order to connect to all of our hardware from home. This will also enable paper access from home.

Instructions for accessing the VPN are provided here.

For Linux users they will need to follow the above PDF instructions, but instead of getting the GlobalProtect software from Palo Alto (which isn't available for Linux), they will need to use the files and follow the instructions in this file and the included Readme.

Last updated

Was this helpful?