GAIVI’s Jupyterhub for CAP6415 Computer Vision
If you have any questions, please email gaiviadmin@usf.edu
1. Connect to USF VPN
2. Login to Jupyterhub
- Go to https://jupyterhub.gaivi.cse.usf.edu/ and login with your NetID as username and your NetID’s password
- You will see some configurations for your notebook. Please select the following
- Slurm Partition: ClsCompVision
- Running Time: the amount of time you will need to use the notebook. Maximum is 23 hours and 59 minutes
- Reservation: Comp_Vision_Spring23
- You can change other resources such as CPU, memory, GPUs, as you like. The defaults should work for most assignments. These resources are limited, so the more you reserve, less people can use the cluster at the same time.
- Click Start. It may take a few minutes to get your notebook ready.
3. Working environment
There are buttons to create new directories and upload files. You will need to upload your Jupyter notebooks. The “jupyterhub_slurmspawner” files are log files of your sessions for debugging purposes. You can delete them to make space.
4. Kernel and Data
- When opening a notebook, you will need to specify the correct iPython kernel. Click the top-right button and select “conda env: computer_vision_CAP6415”. This kernel has all libraries and packages you will need.
- We already uploaded all data sets for the course to the cluster where everyone can read the files and TAs can modify. You no longer need Google Drive to access data. Please remove all the Google Drive code and use the following:
data_dir = '/data/computer_vision_CAP6415/'
5. Clean up
Reserved resources for your notebook will be released upon reaching the time limit. However, it is still a good practice to release them if you finish early. Click File > Hub Control Panel. Then click “Stop My Server”
6. Export your notebook to PDF
From the top-left corner, click “File” > “Save and Export Notebook As” > “HTML”, then download the HTML file. Open the HTML file with your web browser and print into a PDF file.
7. Execute a long-running Python program
Code on a Jupyter notebook will stop running when your browser disconnects from the sessions. If you wish to convert your notebook to Python and execute the Python program while you disconnect, do the following:
- Export your notebook into a Python program: click “File” > “Save and Export Notebook As” > “Executable Script”. Download the Python file.
- Upload the Python file to your notebook session. Let's say this Python file is named “my_program.py”
- Click “File” > “New” > “Terminal”
- Execute
conda activate computer_vision_CAP6415
python my_program.py
- You can disconnect from the Jupyterlab session and come back later. Your code would still run in the background.
- When your Jupyterlab session reaches its time limit, your Python program will also terminate.