ATLAS Experiment OpenData – My Hacks I

Update: Corrected two typos/errors. First, the filename atlas-jupyter.sh was replaced by the correct filename atlas-jupyter.service. Second, the notebook option is called –no-browser not –nobrowser.

In this video the ATLAS Experiment explains how to log on to the virtual machine and start the Jupyter server

There is a way to automate this, of course, so that the Jupyter server starts automatically at boot-up of the virtual machine.

Here’s how I did it.

First, I adapted the run-jupyter-server.sh script to the following:

#!/bin/bash
source /home/student/ROOT/build/bin/thisroot.sh
/home/student/.local/bin/jupyter notebook --ip=0.0.0.0 --no-browser --notebook-dir=/home/student

Then I sudoed to root and went to the directory /lib/systemd/system and created a file called atlas-jupyter.service with the following contents:

[Unit]
Description=ATLAS Jupyter Notebook Service

[Service]
Type=simple
PIDFile=/run/atlas-jupyter.pid
ExecStart=/home/student/run-jupyter-server.sh
User=student
Group=student
WorkingDirectory=/home/student
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target

Then I saved this file and enabled the service with

sudo systemctl enable atlas-jupyter.service

After that I could start it by typing

sudo systemctl start atlas-jupyter.service

And the Jupyter server now starts without problem every time I boot the virtual machine and I don’t have to log in and can also start the virtual machine in headless mode, meaning no console (GUI) necessary.

ATLAS Experiment OpenData – User Notes

This is just a quick note for people using ATLAS Experiment OpenData with Oracle VirtualBox VMs on Fedora.
The installation of the ATLAS VM is wonderfully described here. I just have two quick notes. One for users that run Oracle VirtualBox on Fedora (31) and one that is for the VM itself.

First, you’ll need to install the VirtualBox Extension Pack to be able to start the VM. This is because it needs USB 2.0 support enabled to be able to start the VM. Setting USB settings to USB 1.1 will not fix this. The VM will start, but will get stuck during boot up.
On Ubuntu, the VirtualBox Extension Pack is provided as an Ubuntu package and can be installed with the command

sudo apt install virtualbox-ext-pack

On Fedora there is no such package. So you’ll have to get the VirtualBox Extension Pack from the Website so you’ll have to get it from the above link and manually install it. This is quite easy, though.

Click the download link and choose Open with Oracle VM VirtualBox. After installation the ATLAS VM starts without issue.

Continue reading ATLAS Experiment OpenData – User Notes