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

Detect multiple environments #20

Open
aseyboldt opened this issue May 24, 2024 · 3 comments
Open

Detect multiple environments #20

aseyboldt opened this issue May 24, 2024 · 3 comments

Comments

@aseyboldt
Copy link

If a project has multiple environments (for instance one with gpu and one without), it would be nice if this would show a kernel for each of those environments.

@aseyboldt aseyboldt changed the title Detect multiple environments with kernel Detect multiple environments May 24, 2024
@roaldarbol
Copy link

I think my issue falls under this one - at least it's also related to the environments. I've tried making a Jupyter feature, but the kernel doesn't detect my IRKernel:

[project]
name = "testing"
version = "0.1.0"
description = "Add a short description here"
authors = ["Your Name <and@email>"]
channels = ["conda-forge", "https://prefix.dev/r-forge/"]
platforms = ["osx-64"]

[tasks]

[dependencies]
r-base = "4.2"

[feature.jupyter.dependencies]
jupyterlab = "*"
pixi-kernel = "*"
r-irkernel = "*"

[environments]
jupyter = ["jupyter"]

So the r-irkernel is installed within the feature, but it doesn't get detected:
Screenshot 2024-07-09 at 22 55 59

I open Jupyter with pixi run -e jupyter jupyter lab.

@renan-r-santos
Copy link
Owner

I would love to be able to support Pixi features and environments but I couldn't come up with a good design for this yet. The way this library works doesn't allow for dynamically creating kernel specs based on Pixi environments.
Maybe we could somehow use pixi.toml to define which environment to use when launching a kernel, but I don't believe that would provide a good UX.
I'm very much open to discussing ideas and/or PRs.

@renan-r-santos
Copy link
Owner

Quick update: jupyter/enhancement-proposals#87 should enable pixi-kernel to detect and use multiple environments seamlessly. It is marked for Jupyter 4.4, so it might take a while to land.
I'm looking for alternative approaches such as https://github.com/deshaw/ksmm meanwhile. If anyone wants to work on this, let me know.

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