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

Plans for non-self-contained package? #632

Open
goyalyashpal opened this issue Apr 3, 2023 · 8 comments
Open

Plans for non-self-contained package? #632

goyalyashpal opened this issue Apr 3, 2023 · 8 comments

Comments

@goyalyashpal
Copy link

goyalyashpal commented Apr 3, 2023

Hi!

Intro

I just today found out about jupyterlab desktop (henceforth JLD) via mention in notebook-v7.html#user-stories
I have read both the medium blogs (introduction 2021.09 & latest update 2023.02). The idea of JLD is awesome.

But looking at the releases, the assets for Setup-Windows are >500 MBs.

Main Body

JupyterLab App is the cross-platform standalone application distribution of JupyterLab.
It is a self-contained desktop application which ...
JupyterLab App is based on Electron and it runs the front-end of JupyterLab inside an embedded browser.
The backend of the JupyterLab along with Python libraries are provided via a bundled conda Python environment.

JupyterLab Desktop App now available!
- Mehmet Bektas | 2021-Sep-22 | emphasis mine

While i can understand the reasoning behind making JLD a self-contained application,
but is there any plan to just release the JLD front end to use the existing system wide python environment?

My User Stories

My user story for this against the normal jupyter-lab is:

  • my browser is quite heavy, and I dont feel it to be much reliable.
  • While installing the link localhost:8888 as web app does some isolation,
  • ... but making the shortcut to that web app for launching, changing the start-in directory etc are still a hassle
  • being able to launch it as a separate application not dependent on my browser, and being able to independently configure the launch paths will be nice to haves.

My story for against the self-contained JLD:

  • my system is low on storage (thanks to OEMs bundling small SSDs and not HDDs in their laptop offerings)
  • and i like to keep things minimal where possible and avoid duplicates

Updates 2023.04.15:

Still don't know how to toggle saving of the directory on exiting jupyter-lab, but

  • the location for startup related stuff seem to be stored at %APPDATA%/jupyter
  • startup related stuff like: (like servers, or launching folders/files from previous installation etc)
  • Common Directories and File Locations says run: jupyter --paths , summarised output for my case is shared in unix-styled command below.
  • Note that out of 7 below: 3, namely "$APPDATA/Python"/* and "$ProgramData/jupyter", don't exist on my system
ls {"$APPDATA\Python","$PROGRAMFILES\Python\Python311"}/{etc,share}/jupyter {"$APPDATA/","$USERPROFILE/.","$ProgramData/"}jupyter
  • via stack-overflow's: how-to-set-default-folder-in-jupyterlab-file-browser, i found following way:
    jupyter-lab --generate-config to generate the config file,
    in where search for root_dir,
    find the one with c.ServerApp.root_dir = '' - uncomment it, and specify the root directory in here :)
$ jupyter-lab --generate-config
Writing default config to: %USERPROFILE%\.jupyter\jupyter_lab_config.py
@welcome
Copy link

welcome bot commented Apr 3, 2023

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@JasonWeill
Copy link

JupyterLab Desktop is based on Electron, which means that it bundles certain assets related to rendering HTML, interpreting CSS, and executing JavaScript, in a similar way to a Chromium-based browser. Installing a standalone JupyterLab/Jupyter Server would be lighter in weight than JupyterLab Desktop does, and you can also create shortcuts to open a browser to your locally running JupyterLab, without the Electron-based frontend that JLD provides.

@krassowski
Copy link
Member

krassowski commented Apr 4, 2023

I would think that this is a bug. All Mac/Linux installers are ~300 MB, why is Windows >500MB?

PS. I would love to have an option to install this without conda environment (e.g. having a jupyterlab-desktop-serverless distribution) as I always use my own non-conda environments, but this is probably a minor contributor to the bundle size.

@goyalyashpal
Copy link
Author

goyalyashpal commented Apr 4, 2023

standalone JupyterLab/Jupyter Server would be lighter in weight than JupyterLab Desktop does,

How? talking about the normal pip install jupyterlab ??

... and you can also create shortcuts to open a browser to your locally running JupyterLab

if talking about above mentioned method, then i have already highlighted the points related to this above.

All Mac/Linux installers are ~300 MB, why is Windows >500MB?

i glossed over it earlier, but now that you brought it up it's really a valid point.

One common reason for why windows installers are bigger than mac/linux ones is that they use posix tools and hence bundle them in the windows package.

This is based on experience with octave for windows, oh my git, git for windows, etc...
see my other comment here: git-learning-game/oh-my-git#23 (comment)

this is probably a minor contributor to the bundle size.

i don't think so.
2 things come to mind:

    • VS Code is also based on electron - it's just 90 MB on windows - similar is the setup size for my Vivaldi browser.
    • Though, I don't know the size of the jupyter/python extension VSCode uses to run notebooks or if it downloads any other thing (like some LS extensions in VSCode download LS binary w/o informing).
  1. this huge size makes JLD comparable to the Anaconda (600 MB).

Python package is 25-30 MB, don't know jupyterlab pip module's size; package size of msys2 distribution is roughly 80-90 MB. So,

@mbektas
Copy link
Member

mbektas commented Apr 7, 2023

@goyalyashpal we don't have a distribution without bundled conda environment unfortunately but we would like to have it eventually. You can delete the conda env installer from C:\JupyterLab\resources\env_installer\ directory to save space if you won't be using it.

@goyalyashpal
Copy link
Author

we would like to have it eventually

thats great :)

delete the conda env installer from dir

nice point, if not there already, then for the time being, this choice to disable it can also be made available via JLD installer itself in the "custom installation options".

@goyalyashpal
Copy link
Author

goyalyashpal commented Apr 11, 2023

I just found jupyterlite via jupyter home site (refer from julia)

JupyterLite is a JupyterLab distribution that runs entirely in the browser built from the ground-up using JupyterLab components and extensions.
JupyterLite Project | emphasis mine

several of the environments below use the JupyterLite project to provide a self-contained Jupyter environment that runs in your browser ...
https://try.jupyter.org


Jupyterlite: Wasm powered Jupyter running in the browser 💡
https://github.com/jupyterlite/jupyterlite

@goyalyashpal
Copy link
Author

goyalyashpal commented Aug 30, 2024

  • While installing the link localhost:8888 as a progressive web app (PWA) does some isolation,

also, now i have moved away from the google chromium-based browsers to google-mozilla firefox-based browsers.

but sadly, firefox doesn't support web-apps, so yeah... yet another hassle and needless dependency on the underlying system of the user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants