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

Python environment management enhancements #668

Merged
merged 41 commits into from
Jul 4, 2023
Merged

Python environment management enhancements #668

merged 41 commits into from
Jul 4, 2023

Conversation

mbektas
Copy link
Member

@mbektas mbektas commented Jun 11, 2023

  • use conda-pack instead of constructor.
    • This greatly improves Windows install & uninstall experience
    • Enables installations to different disk locations
    • Enables Snap installers for Linux
  • use conda-lock to optimize conda env create
  • optimize github action builds by using conda lock file for workflow
  • Environment management via CLI
    • env install command to install bundled Python environment
    • env activate command to activate bundled Python environment
    • env create command to create new Python environments
    • env info command to show Python env configuration
    • env list command to list environments available to app
    • env update-registry command to update discovered and user set Python environments without launching UI
    • env set-base-conda-env-path command to update base conda environment path

@mbektas mbektas requested a review from krassowski June 12, 2023 16:35
@mbektas mbektas marked this pull request as ready for review June 12, 2023 16:36
@krassowski
Copy link
Member

Some high level questions:

  • what are the advantages of using this approach? I presume this would reduce the installation time as the resolution step is eliminated. Anything else?
  • how is this going to work with M1 and other architectures which may require a dedicated version of conda binaries?

@mbektas
Copy link
Member Author

mbektas commented Jun 17, 2023

@krassowski using conda-pack brings several advantages, some are:

  • Windows installation process is improved since users wont need to use Windows installer UI for installing and uninstalling Python environment. This has been causing issues with Windows registry as well.
  • Flexibility and more control over Python environment management from app. Now we can install the bundled environment into other locations easily.

Github Actions doesn't have Apple silicon runners yet, that's why we don't bundle an Apple silicon conda env (x64 conda envs still work fine on Apple silicon). But, this PR introduces new CLI options to create environments (jlab env create). Users will be able to create an Apple siicon environment easily using this CLI option. I hope to add UI for managing Python environments later on.

@mbektas mbektas changed the title use conda-pack instead of constructor for the bundled environment Python environment management enhancements Jun 17, 2023
@mbektas mbektas marked this pull request as draft June 18, 2023 03:20
@mbektas mbektas marked this pull request as ready for review June 25, 2023 05:21
@krassowski
Copy link
Member

The Windows installer ballooned even further from 471 MB on latest release to 525 MB in this PR. This is over twice the size of the Debian installed (250 MB). Is there anything we can do to reduce the installer size? As previously mentioned by users elsewhere it is 6 times the size of VS Code installer.

@krassowski
Copy link
Member

So unpacked contents are the same size for Debian and Windows installed; the compression just does not work?

@krassowski
Copy link
Member

Enabling maximum compression for Windows does not help much (466 MB vs 471 MB) krassowski#21.

@krassowski
Copy link
Member

krassowski commented Jul 2, 2023

Hmm.. It seems that jlab . to open another project does not work for me anymore? Nor opening a new window in general? I am not 100% positive if this is related. I also see null printed out in terminal when using jlab.

Edit: new window from UI works. It does not work from OS-level integration nor from terminal. Odd.

@mbektas
Copy link
Member Author

mbektas commented Jul 3, 2023

Hmm.. It seems that jlab . to open another project does not work for me anymore?

Good catch. I am pushing a fix for this.

@mbektas
Copy link
Member Author

mbektas commented Jul 3, 2023

The Windows installer ballooned even further from 471 MB on latest release to 525 MB in this PR. This is over twice the size of the Debian installed (250 MB). Is there anything we can do to reduce the installer size? As previously mentioned by users elsewhere it is 6 times the size of VS Code installer.

7-zip compression is an alternative we can try. We can compress the env installer using 7z.

@mbektas mbektas merged commit cbad2f7 into master Jul 4, 2023
Copy link

@Talonkinkade Talonkinkade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merged

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

Successfully merging this pull request may close these issues.

3 participants