-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add JupyterLab as a feature #1335
Add JupyterLab as a feature #1335
Conversation
If Python is not installed, error out and tell the user that it's missing.
Wouldn't it make sense to check to see if it's already there before installing? I'd also recommend checking this with the python-3 and python-3-anaconda definitions since I gartunee people will use it with that. You should probably also deal with cached wheels, etc here. Not doing that will leave a lot of unneeded content in the image (making it even bigger). Adding @dynamicwebpaige Does it make sense to do this as a straight pip install (verses pipx)? I kind of assume so, but thought I'd ask. |
A few other thoughts here in thinking about it. Features are installed using the "root" user. The problem here is that you could end up inadvertently end up doing one of two things:
I'd verify what happens on disk after this is installed to be sure nothing major breaks. You also may want to set Also - for codespaces-linux, be sure to verify the scenario where a version of python is dynamically acquired by Oryx. If you use "pipx" you'd be abstracted from those kinds of changes. But I'm not sure what would happen if you install when the default version of python in the image using pip and then a different one ends up getting used to. I'd be worried it would just totally break or, failing that, it wouldn't be in the virtual environment that was created. e.g., add a This one is very specific to that image... you wouldn't see it in a normal python / anaconda one. Unlike something like node, there's a lot of version specific magic tied to native compilation in pip packages. |
script-library/container-features/src/devcontainer-features.json
Outdated
Show resolved
Hide resolved
If it's helpful, @Rabadash8820 's PR adding in the |
Thanks, I added a check for this.
Works fine with python-3. I made a small change to python-3-anaconda to copy
Added |
Thanks for your comments @Chuxel!
I updated it to install to the non-root user if there is one. This installs
I added the
And when I I run I'm testing it outside of my branch to try to figure out if this is something that broke in my branch somehow. |
That issue I'm having with |
Hacking the Dockerfiles to add |
Possibly related to the |
I worked around the issues with runtime.txt and confirmed that JupyterLab was working just fine with an Oryx-installed version of Python. |
Great - @bratsche and I chatted and now with additions to the PATH, smoke test passes |
If Python is not installed, error out and tell the user that it's missing for now. The intent here is to improve this to auto-install Python later, but this seems like a good first step.