Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Introduction to Work Environment

Access the cloud

We will use STFC cloud environment https://jupyter.stfc.ac.uk. It runs a custom baked docker image of Ubuntu Questing Quokka

Use the username given at registration and following instructions to setup your instance.

Create account and login

  1. Go to jupyter.stfc.ac.uk DO NOT CLICK on sign in!

landing page
  1. Signup: click on Signup then use the username given and choose password and click Create User

landing page

Authorization happens behind the scenes if successful you will see something like.

landing page
  1. Login with the credentials from above

landing page

You shall see something like this, if all ok,

landing page

or instance already started. see below.

Create instance

In the list you shall see ml2026, select it and click start.

Once you click start will spawn the new VM machine, shall take 2 min or so but sometimes can be faster or slower, which exists for 24h by default and has a persistent home directory associated with your user.

landing page

Stop instance and update

if things go wrong or you need to create an instance with an updated image you need to follow the following steps.

  1. get the hub settings: File -> Hub Control Panel

landing page
  1. stop the instance

    stop the instance by clicking on the “Stop My Server” button then once stopped you can click Logout.

landing page
  1. logout and create a new instance as above. This will use the latest version of the image.

Obtain exercises

open a terminal

cd
git clone https://gitlab.com/cam-ml/tutorials.git WORKSHOP

a WORKSHOP folder will appear on the left hand side and now you can navigate inside it and find the relevant notebook of the day.

Useful commands

as tutorials get updated or corrected during the school you may need to pull again, solution or corrections. To do this in general you do

# be sure you are in the right folder
cd ~/WORKSHOP
git pull

if you have local changes, you may want to use

git stash

to save your changes, after this you can do git pull

after you can restore your changes with

git stash apply

Compilers

The GNU toolchain is used throughout the summer school and are available at the unix prompt.

There are several editors available. You should choose whichever you are confortable with.

Advanced: run locally with docker/podman

Both Docker and podman shall work. We will use pod’man in these instructions.

  1. install podman

    Follow the instructions for your operating system. Depending on your OS this may be simpler or more difficult we suggest you do this prior to school.

    For Linux your package manager probably already has podman.

    For Windows and MacOS choose podman CLI* and install. For windows install wsl2 before be sure you set version 2.

    For windows and MacOS start the machines by starting a shell, Windows Powershell in windows any terminal in mac.

# only windows and MacOs
podman machine init
podman machine start
  1. create a folder to share with the machine(optional)

    this folder can be sure to get data from the jupyterhub on your local harddrive after you shut it down. Be careful that is not writable to a normal user on your machine, only root on Linux.

mkdir work
# next command is only on linux
podman unshare chown 1001:100 work
  1. start the container

    Execute the command in a terminal.

podman run --rm --security-opt seccomp=unconfined -p 8888:8888 -v ./work:/home/jovyan/work:Z harbor.stfc.ac.uk/ccp5/ml2026:latest

if you see this error, especially on MAC OSX

Trying to pull harbor.stfc.ac.uk/ccp5/ml2026:latest...
Error: internal error: unable to copy from source docker://harbor.stfc.ac.uk/ccp5/ml2026:latest: choosing an image from manifest list docker://harbor.stfc.ac.uk/ccp5/ml2026:latest: no image found in image index for architecture "arm64", variant "v8", OS “linux"
podman run --rm --security-opt seccomp=unconfined -p 8888:8888 --platform linux/amd64  -v ./work:/home/jovyan/work:Z harbor.stfc.ac.uk/ccp5/ml2026:latest
  1. get into the container

    At this stage you should have a running jupyter hub, all you need is to start it in your browser. You shall see various debug lines in your terminal, locate Or copy and paste one of these URLs: part and click on one of them.

start
  1. if all is ok you shall see

hub
  1. click on Desktop tile to get access to a traditional environment

desktop
  1. close the container

    Ctrl+C in terminal will do it.

  2. keep the image up to date

podman pull harbor.stfc.ac.uk/ccp5/ml2026:latest
  1. [optional] If you have an NVIDIA GPU and you want to use, check the instructions here https://podman-desktop.io/docs/podman/gpu

Note you can change the theme by going to Settings->Theme->

Obtain exercises

open a terminal, clik on the Terminal tile.

cd
# or if you setup the work folder above, uncommend bellow
#cd work
git clone https://gitlab.com/cam-ml/tutorials.git WORKSHOP

a WORKSHOP folder will appear on the left hand side and now you can navigate inside it and find the relevant notebook of the day.

checkout WORKSHOP

Using Google Colab

Run using Google Colab

  1. Get a google account if you do not have one.

    Navigate to the desired tutorial on [tutorials website](https://workshop.camml.ac.uk/) and click the ico badge.

  1. be sure you execute the Google colab specific section of each tutorial, shall be one.

Note: google colab instances are not persistent so you may want to save your work in google drive or download it on your machine.