Skip to content
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 to mount a local directory? #25

Open
hning86 opened this issue Nov 20, 2021 · 4 comments
Open

How to mount a local directory? #25

hning86 opened this issue Nov 20, 2021 · 4 comments

Comments

@hning86
Copy link

hning86 commented Nov 20, 2021

How can I mount a local directory to the kernel? Normally I'd use the "docker run -v" switch. But how to do this with dockernel? Thx.

@FalcoWeich
Copy link

Seems like this is not being updated anymore. May I help? 🙋 I can have a look, because atm it is something I would highly appreciate given the fact that I am using a rapidly changing code base which is mounted into my docker. Without an attachment these do not get updated. Thus everytime the code base is updated I need to ➡️ delete the kernel ➡️ build a new docker image ➡️ register new image as jupyter kernel using dockernel.

Something else annoying is, that the display_name may be set correctly, but not the file name. This means that I have to delete a generic id in the jupyter kernelspec list and therefore cannot simply automate this process.

Cheers and thx @MrMino for the nice tool!

@FalcoWeich
Copy link

Nevermind my comment on "cannot simply automate". For the moment I am using this .sh bash script ⤵️

#!/bin/bash

# remove all the kernels that have a number in their name
old_kernels=$(jupyter kernelspec list | grep -E '\b\w*[0-9]\w*[0-9]+\w*\b')
for kernel in $old_kernels
do
    jupyter kernelspec uninstall $kernel -y
done

# Update the docker image
docker build -t "docker_image" .

dockernel install docker_image --name docker_image_dockernel

jupyter lab

@MrMino
Copy link
Owner

MrMino commented Jun 13, 2023

@FalcoAlitiq You are free to send PRs :)

But I cannot vouch for when I'll have time to review. The simpler the changes are - the higher the probability I'll be able to do something sensible with this project.

At the moment I don't have the time this project would need / deserve.

@MrMino
Copy link
Owner

MrMino commented Jun 13, 2023

IIRC adding this feature requires adding the -v to the cli args in the kernelspec. Afterwards, the bigger question would be how to make this configurable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants