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

using CondaPkg with Pluto leads to unnecesarry resolves #120

Closed
schlichtanders opened this issue Nov 11, 2023 · 7 comments
Closed

using CondaPkg with Pluto leads to unnecesarry resolves #120

schlichtanders opened this issue Nov 11, 2023 · 7 comments

Comments

@schlichtanders
Copy link

schlichtanders commented Nov 11, 2023

Hi

I am integrating CondaPkg with Pluto and realized that I have a lot of overhead everytime I start a new Pluto notebook despite all condapkg already being installed.

I debugged it a bit and saw that it is due to a meta file which, if it is missing, triggers a complete reinstall.

The situation for me is that Pluto always creates a fresh new Julia environment (temporary) when opening a notebook. The CondaPkg.toml will be written into it.

  • there is no meta file written initially
  • I am preserving the conda environment via JULIA_CONDAPKG_ENV environment variable, hence the package are indeed preserved and can be found by conda

I think two steps would be needed to make the conda resolve work in such Pluto scenario:

  1. place the meta file inside the conda environment instead of the julia environment
  2. make the meta file check not compare creation times of CondaPkg.toml and the meta file (this would still invalidate), but rather use a hash of the CondaPkg.toml file

What do you think?

@schlichtanders
Copy link
Author

@cjdoris I have resource to create a pullrequest. Would you like to have this changed?

@schlichtanders
Copy link
Author

My current thought is that it might be the better approach to extend Pluto with a feature to preserve environments.

@schlichtanders
Copy link
Author

My current thought is that it might be the better approach to extend Pluto with a feature to preserve environments.

this was much simpler and already worked out.

@stillyslalom
Copy link

stillyslalom commented Apr 3, 2024

@schlichtanders what solution did you arrive at? I'm using Preferences.jl to set a shared Conda environment by default for a package, but the preference is ignored by Pluto, which leads to a minute or more of Conda resolve time every time the notebook is launched.

@schlichtanders
Copy link
Author

I have my own fork of Pluto where I now create a hashed project directory instead of a random one.
This way I am resolving this issue. Unfortunately I haven't found a workaround without changing Pluto

@stillyslalom
Copy link

Do you know if there's already an issue filed in the Pluto repo? I couldn't find one, but I'll create one if it doesn't exist.

@schlichtanders
Copy link
Author

I haven't created one. But I probably could extract some parts of my fork in order to solve a respective issue. Can't promise how much time I have though

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

2 participants