Okay, so I’ve been playing with the previous setups and found that I wanted a leaner setup on my Raspberry Pi Zero W Side Hat (Pocket RPi). I found the JupyterHub was too heavy weight for the memory on the Pocket RPi. I still wanted the JupyterLab capability, and I wanted it to come up at boot. The hunt was on.

After tons of searches I found the best instructions from a guy named Bradford here. This got me 80% of the way there. I found the pyenv setup still too heavy for the Pocket RPi, and the pipenv is still way too slow. I’m not sure why that is, since it’s just links, but that will be a future effort. So I didn’t add those. Once I made those tweaks, I was able to get the system up and everything was fine. . .until I logged out and everything fell down.

I went back and forth on whether to promote the service and the install to root or not, and then I found the solution – linger. Super easy, just run "sudo loginctl enable-linger pi” after enabling the user service and you’re off.

Lean JupyterLab running on Pocket RPi

The picture above is showing the Pocket RPi hosting the JupyterLab out of the Pi user space and consuming about 50MB of RAM, and virtually no CPU. Previous attempts with the JupyterHub consumed about 200-300MB of RAM, and running pyenv regularly spiked my CPU to 100%.


Leave a Reply

Your email address will not be published. Required fields are marked *