First of all you will need to login to Balena.
Once you are logged in you can launch an interactive job using the command sint
. If you want to configure your interactive job then refer to the help sint --help
.
You now need to load the python/anaconda module you want to use:
module load python3/2019.x
If this is the first time using Jupyter notebooks on Balena you will need to run
jupyter notebook --generate-config
and set a password so that only you can access the server:
jupyter notebook password
This will prompt you to enter and verify your password:
Enter password:
Verify password:
Note that, as when you log in to Balena, the cursor will not move and no *s
will print to the screen when you enter the password.
We are going to launch the Jupyter notebook server on the interactive node, and access this from a web browser on our local machine. In order to do this we need to know the ip address of the node and the port that the server users. We can get the first using the command:
host $(hostname)
which will produce an output similar to:
itd-ngpu-01.cm.balena has address 172.30.6.201
Make sure that you run this in your own interactive session!
Now we can launch the Jupyter notebook server:
jupyter notebook --ip="*" --no-browser &
This will produce several lines of output. We need the line which contains output similar to:
[I 17:58:48.994 NotebookApp] http://[all ip addresses on your system]:8888/
You can now access the notebook server by opening a web browser on your local machine and, in this case above entering the address:
http://172.30.6.201:8888
If you have follwed the tutorial successfully you should be prompted for the password you entered earlier and be launched into the familar Jupyter notebooks environment.