-
Notifications
You must be signed in to change notification settings - Fork 399
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
Codespace unable to start in Jupyter using python feature with option "installJupyterLab": true #870
Comments
Tagging for visibility: @jungaretti @samruddhikhandale |
Hi 👋 Can you try with the following {
"name": "Only Jupyter",
"image": "mcr.microsoft.com/devcontainers/universal:2",
"hostRequirements": {
"cpus": 4
}
} I vaguely remember there needs another configuration change (when using Python Feature) which doesn't seem to be documented. |
Thank you @samruddhikhandale, Yes, the "mcr.microsoft.com/devcontainers/universal:2" image opens with the Jupyterlab editor. Probably because it already has Jupyter installed within it. This image works with JupyterLab, with or without the python feature. However, my goal is to use features to introduce the Python & JupyterLab into an image that didn't already have it; and then use that image to start in Codespace's Jupyter Editor. The "mcr.microsoft.com/devcontainers/universal:2" image is over 13.7GB, way more than what I need in my containers. Any other thoughts? Could it be because of the |
Is this a problem with the JupyterLab is installed in the We hardcode this value into the non-login |
Thanks @jungaretti for pointing it out, and yes ^ this is the dev container configuration change needed for a codespace to be opened with JupyeterLab. @prabhakk-mw Can you add a similar change with Looping in Codespaces PM @craiglpeters, this is a known gap ^ in our documents where the Python Feature don't work without the |
@prabhakk-mw It looks like you are using a login shell that adds the You can use
|
@samruddhikhandale , Thank you for your suggestions. @jungaretti, Thank you for the clarification. However, I've taken a pass at fixing the issue at the feature level in #887 |
* Adds /home/USER/.local/bin/ to PATH in /etc/sudoers.d/vscode, fixes #870 * Bumping up version to 1.4.2 * Adds to sudoers file if already present * Tests to ensure Default secure_path is not overwritten * Bump to version 1.4.4 * Fix version as 1.4.3 Co-authored-by: Samruddhi Khandale <[email protected]> * Update src/python/install.sh Co-authored-by: Prabhakar Kumar <[email protected]> * Update src/python/devcontainer-feature.json --------- Co-authored-by: Samruddhi Khandale <[email protected]> Co-authored-by: Samruddhi Khandale <[email protected]>
I created a dedicated branch on my repo that point to the exact last version of the python feature (1.6.0): https://github.com/gee-community/ipygee/tree/test-jupyterlab I created a codespace that still works fine on VS code (https://github.com/gee-community/ipygee/codespaces) but still fail to run in jupyterlab. So unfortunately it seems we are back to square 1.
@prabhakk-mw did you try your solution from your side ? If yes can you explain what I did wrong ? |
@12rambau I also confirm that the fix proposed in #870 (comment) which was implemented in #887 does NOT fix the issue. Now when I start the codespace, @prabhakk-mw ➜ /workspaces/test-matlab-codespaces (main) $ which jupyter
/home/vscode/.local/bin/jupyter
@prabhakk-mw ➜ /workspaces/test-matlab-codespaces (main) $ sudo cat /etc/sudoers.d/vscode
vscode ALL=(root) NOPASSWD:ALL
Defaults secure_path=/home/vscode/.local/bin:/usr/local/python/3.10.14/bin:/usr/local/python/current/bin:/usr/local/py-utils/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/py-utils/bin
@prabhakk-mw ➜ /workspaces/test-matlab-codespaces (main) $ I still see the following screen: @jungaretti do you have any ideas as to why this might be happening? The {
"name": "Only Jupyter",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"hostRequirements": {
"cpus": 4
},
"features": {
"ghcr.io/devcontainers/features/python": {
"version": "3.10",
"installJupyterlab": true,
"configureJupyterlabAllowOrigin": "*"
}
},
"containerUser": "vscode"
}
What else I have tried:
@samruddhikhandale , can you please reopen this issue? Also, do you know anyone from the |
Have you had any luck getting this working with the changes in #887 ? I tried using the following {
"name": "Only Jupyter",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"hostRequirements": {
"cpus": 4
},
"features": {
"ghcr.io/devcontainers/features/python:1.6.0": {
"version": "3.10",
"installJupyterlab": true,
"configureJupyterlabAllowOrigin": "*"
}
},
"containerUser": "vscode"
} ...but see the following error.
Thanks for any suggestions! |
No, @jcansdale ... It didn't work. See #870 (comment) |
Looking at the Codespace export logs, the codespace is still not able to find Looks like we also need to add I tested with 👇 and {
"image": "mcr.microsoft.com/devcontainers/python:3.10",
"features": {
"ghcr.io/devcontainers/features/python:1": {
"version": "none",
"installTools": "false",
"installJupyterlab": "true",
"configureJupyterlabAllowOrigin": "*"
}
},
"containerEnv": {
// testing
"PATH" : "/vscode/bin/linux-x64/dc96b837cf6bb4af9cd736aa3af08cf8279f7685/bin/remote-cli:/home/vscode/.local/bin:/usr/local/python/current/bin:/usr/local/py-utils/bin:/usr/local/python/current/bin:/usr/local/py-utils/bin:/usr/local/share/nvm/current/bin:/usr/local/bin:/usr/local/python/current/bin:/usr/local/py-utils/bin:/usr/local/python/current/bin:/usr/local/py-utils/bin:/usr/local/share/nvm/current/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/vscode/.local/bin"
}
} |
I fail to understand why it's not possible to do the same as in universal ? is it because the Python/jupyter is store in the user local path ? |
I think it might be because universal uses Oryx, which makes it a very different beast. This is just a hunch though. |
This should be fixed with #887, closing! |
@samruddhikhandale, the comments we made in May are showing that #887 is not changing anything to the issue. What new development is solving the issue that you pointed out yourself here: #870 (comment) ? I quickly checked with the following codespace and it still fail: {
"name": "Python 3",
"image": "mcr.microsoft.com/devcontainers/python:1-3.11-bullseye",
"features": {
"ghcr.io/devcontainers/features/python:1": {
"installJupyterlab": true
},
"ghcr.io/devcontainers-contrib/features/nox:2": {},
"ghcr.io/devcontainers-contrib/features/pre-commit:2": {}
},
"postCreateCommand": "python -m pip install commitizen && pre-commit install"
} |
…pen codespace in jupyterlab
Completed in PR #1199 |
I used all my codespaces for december, I'll check in my repositories in january once I can create new ones. |
Happy new years to all! |
Listed below is the
devcontainer.json
file that I am using to start a codespace on GitHub.When attempting to open in
Jupyter
as shown in the image below:I get the following error:
The documentation for opening-your-codespace-in-jupyterlab seems to suggest that this should be all I need to do.
Restarting the codespace as the option suggests has no effect.
I can however, open in VSCode, and start
jupyter lab
from the terminal and access it in a separate browser tab.Any help would be much appreciated!
The text was updated successfully, but these errors were encountered: