My use case for jupyterhub requires that each user be able to access low-level resources of the system, which are only accessible with high-privileges (sudo).
So basically what I am trying to do is:
c.Spawner.cmd = "sudo jupyterhub-singleuser"
Of course, this does not work as this is not interpreted as a single file. I have tried a similar approach with a bash script, but the process simply timesout.
#!/bin/bash
source ./etc/profile.d/pynq_venv.sh
# actually launch the single-user server
# - exec replaces the current process (avoids extra intermediate process)
# - $@ passed through arguments, so this script behaves the same as the default command
exec /usr/local/share/pynq-venv/bin/jupyterhub-singleuser $@
Running this works, but does not gives me the correct permissions. Doing something like: