NYU JupyterHub Setup
NYU JupyterHub Setup#
Psychology is reorganizing the labs for cognition and perception. Todd Gureckis has developed several easy python Jupyter notebooks to introduce undergraduates to basic concepts, like hypothesis testing. http://gureckislab.org/courses/fall19/labincp/chapters/09/00-hypothesistesting.html Here is what you need to do to use these notebooks in your class. You’ll need to create (currently free) accounts at the High Performance Computing center (HPC), and install necessary python modules.
Overview and FAQ#
You can send questions by emailing firstname.lastname@example.org
Apply for an account for yourself and students: https://sites.google.com/nyu.edu/nyu-hpc/training-support/resources-for-classes/jupyterhub/jupyterhub-intake-form?authuser=0
Wait, about a day, for an email announcing accounts for you and your class. It will provide an instructor link (for you and TAs) and a student link for all your students.
Read the manual#
Log in as the instructor and read the ~/tuning/MANUAL.html
There are several ways to add students. The recommended way is to add their NYU ids to the white list. Edit the file /tuning/settings.txt, and add the student NYU IDs to this line: STUD_WHITELIST:xx123,xy123,xx234,xx234 (Those IDs are for a hypothetical class. Yours will be different.)
Before doing custom software installations (see below), turn on TURBO mode, as explained in the MANUAL. TURBO temporarily increases your resources, hopefully enough to allow installations, and turns itself off some hours later. You have to wait around 10 m or more for your request to be acted on. I’m not sure how you can tell that you’re in TURBO mode. Without TURBO, our every attempt to install died with a “Kill” error message. Even with TURBO, some installation attempts were Killed. For example, trying to install two scikit modules in one install failed, but succeeded when installed in separate commands.
As explained in MANUAL, use Terminal to load Python modules. These are commands to load the modules needed by Todd Gureckis’s teaching notebooks for Cognition and Perception:
conda create --name perception python=3.7 conda install -n perception ipykernel conda activate perception conda install -c conda-forge pandas conda install -c conda-forge seaborn conda install scikit-learn conda install scikit-image conda install colorlover matplotlib pingouin pip install celluloid
To do further installations at a later time, begin with conda activate perception
Persistant storage for students#
The default is for student accounts to remember nothing from session to session. There’s an option one can edit to make their changes persistent (until end of semester). Edit the file
~/tuning/settings.txt and change this
Save the file.
Every time you or a student spawns a new session, to use the modules you installed above, you and each student must use the Kernel menu to select Change Kernel, and select the “Python [env:Perception]” kernel.