-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How might it be possible to add IJulia to KNOWN_KERNELS
?
#3
Comments
This is a good point when adding more kernels. Normally the Python kernels also hardcode the path to Python, but I could leave that out because envkernel would normally set up the PATH properly, so I could just assume it would be OK (for now). But the One way I sort of got around this was with The immediate workaround is to use To be fully general, we could add another option I think the first option ( |
@rkdarst I agree, that option makes the most sense to me too. It seems somewhat unfortunate that kernelspec JSON's are not more similarly formatted between different languages' kernels, but maybe it wouldn't make sense to expect otherwise. |
(more design background) And you know, the whole Here is how I thought the module load my-conda # at /path/to/conda
python -m ipykernel install --name=conda1 --prefix=/prefix/of/jupyterlab
# The kernel is now installed and will work, because it hardcodes the path
# /path/to/conda/bin/python. But running this won't set $PATH and other things
# to the conda env
envkernel lmod --name=conda1 --kernel-template=conda1 --prefix=/prefix/of/jupyterlab
# This reads in existing conda1 kernel, prepends the lmod-loading part to argv, then
# saves it back to the same name: conda1 This type of thing is completely general, and would work with any reasonably well-behaved kernel. I can imagine a problem with containers: you can install the kernel in the container that encodes the right paths, but getting that out is a problem. Though I guess you get get around that with mounting stuff cleverly. It would be nice if envkernel could make the template automatically... but that would again require it to know every other kernel. So for now I guess the general method is to install the kernel yourself, then What do you think? |
I guess to be honest I'm not sure what the I think this is might be a little bit out of my depth. I'm slightly familiar with (Actually this repository came up because we were considering calling |
I saw this issue again, and also saw some old stuff I had written. I should link them: I haven't re-read everything above, but the basic idea is "we can't know every kernel. So expect a user to install the kernel normally somehow, then we can --kernel-template=" to clone the argv to our new envkernel. This won't necessarily work in every case... but it does in my case at least and hopefully a lot of them. |
As far as I can tell, the value of
argv
in akernel.json
corresponding to an IJulia installation should be:Comparing this to what's already in
envkernel.py
, it seems like adding IJulia as a "known kernel" would amount to something similar to:However, the command seems to require knowing the location of the file
kernel.jl
(corresponding seemingly to the install location of IJulia), and the above doesn't seem like it would fit with that.I wanted to submit a PR along these lines, but I'm not sure how to deal with the issue of the
kernel.jl
file's location to make a PR that would actually work.The text was updated successfully, but these errors were encountered: