yitzchak / common-lisp-jupyter

A Common Lisp kernel for Jupyter along with a library for building Jupyter kernels.
https://yitzchak.github.io/common-lisp-jupyter
MIT License
218 stars 29 forks source link

PATH passed to launch_kernel/Popen() doesn't contain ~/roswell/bin #112

Closed ayjayt closed 12 months ago

ayjayt commented 1 year ago

I followed the installation instructions...

So I deleted my original issue, but it's still in the same way: If we're using jupyter hub, we need a way to do per-user path, and that seems hard with the defaults. The lab's inherit their PATH from the hub, which is root. Looking for ways to do it in the config, but then this would be good to add to the docs.

ayjayt commented 1 year ago

ax that, /etc/environment is NOT loaded by the server launcher.

This is probably cause I'm using hub on systemd but I'm gonna suss out a solution right now anyway.

ayjayt commented 1 year ago

SOLUTION (hack) Not great,

I changed c.Spawn.cmd in jupyterhub.config (or whatever it's called) to jupyterhub-singleuser to jupyterhub-singleuser-alias and created said jupyterhub-singleuser-alias as a bash script in the same directory as the jupyterhub-singleuser:

#!/bin/bash
export PATH=$PATH:$HOME/.roswell/bin
exec jupyterhub-singleuser

Didn't find any other way to do. Could be wrong. There is no other script that gets sourced before the server is started that allows you to export per user variables. Nothing seems to be executed in a shell by default.

yitzchak commented 1 year ago

I'm not quite sure why is this a common-lisp-jupyter issue. I don't really use Roswell anymore, but there is an "env" section in the kernel file. https://jupyter-client.readthedocs.io/en/latest/kernels.html#kernel-specs

ayjayt commented 1 year ago

Thanks, I posted here because I followed the instructions here to install it all and still came across the error. (Edit: so i figure the idea would be to make the documentation here clearer so people can use the kernels w/ jupyterhub)

What should we use if not roswell?

That 'env' variable in the kernel file might work, but if we were going to include a note about that in the instructions to make them compatible with jupyterhub, where would it be, and where we would find the kernel file?

yitzchak commented 1 year ago

You can find the kernel files by doing jupyter-kernelspec list

ayjayt commented 1 year ago

Ok, so I'll test it out... would you be open to a pull request to add to the docs this information for installation so jupyter hub users can also use common-lisp-jupyter with roswell? or should i not bother

On Sun, Sep 17, 2023 at 11:36 AM Tarn W. Burton @.***> wrote:

You can find the kernel files by doing jupyter-kernelspec list

— Reply to this email directly, view it on GitHub https://github.com/yitzchak/common-lisp-jupyter/issues/112#issuecomment-1722502982, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHHLRFL4GCJKW75XHR5UH4DX24KGVANCNFSM6AAAAAA43AXSCA . You are receiving this because you authored the thread.Message ID: @.***>

yitzchak commented 1 year ago

Sounds good