-
Notifications
You must be signed in to change notification settings - Fork 444
feat: Create Individual Virtual Env for the Kernel #73
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
Conversation
… way, referring to previous code is simpler.
message_status for 'Kernel is ready' and the like message_error for error messages/backtraces from execution
…allow for easier back-reference, e.g. when asking 'Please fix the code'
…al env TODO: file up- and download does not work yet due to the 'workspace' dir not being mapped correctly
…g as we do not implement multi-user-support. For this, things are prepared, though.
Dev/more icons
only try to run code if code has been found
Dev/kernel env
Dev/conversation history
This is really nice! But can we make it so that restarting the app will pick up on a created kernel venv? |
I'll give it a try. - Definitely makes sense (at least during development the slow startup times are annoying :-D ). Currently, I am working on a multi-client version, where everybody needs to have their own kernel. Will have to think how to get both requirements into a common approach. Possibly, creating one template venv and re-using it for all kernels (via copy/symlink) might be an option to make things quicker... |
…al env TODO: file up- and download does not work yet due to the 'workspace' dir not being mapped correctly
…g as we do not implement multi-user-support. For this, things are prepared, though.
We first create a base venv that is not to be deleted and can be re-used easily. There we install all default packages. Then, we create another, kernel-specific, venv without any additional packages. Instead, we create a link that points to the packages installed in the base image. The base image is intended to stay immutable. All newly installed packages end up in the kernel-specific venv. While they are lost on restart, the packages inside the base image are not.
Hi @ricklamers, We first create a base venv that is not to be deleted and can be re-used easily. Then, we create another, kernel-specific, venv without any additional packages. The base image is intended to stay immutable. All newly installed packages end up The overall idea is coming from https://stackoverflow.com/a/75545634 and - reading |
Closing this for now to cleanup git history. - Will re-open afterwards. |
Although the |
Thank you for your comment. Answering here: #74 (comment) |
feat. add configuration for proxy.
This addresses #6 and #62 - at least partially.
Whenever the kernel is invoked, we start with an empty directory and set up a virtual environment with the standard packages. If an additional package is needed, the corresponding
!pip install PACKAGE
call can be executed and packages do not pollute the system environment.Note, that the approach considerably dilates kernel startup time. - Thus, debugging is not always fun with this.
An example prompt for this is
I think (!), this could be a good baseline for addressing #67 as well. - At least, running kernels with separate environments would be possible this way.