jupyterlab / jupyterlab-desktop

JupyterLab desktop application, based on Electron.
BSD 3-Clause "New" or "Revised" License
3.65k stars 349 forks source link

Plans for non-self-contained package? #632

Open goyalyashpal opened 1 year ago

goyalyashpal commented 1 year ago

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 story for against the self-contained JLD:


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 :) ```console $ jupyter-lab --generate-config Writing default config to: %USERPROFILE%\.jupyter\jupyter_lab_config.py ```
welcome[bot] commented 1 year ago

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
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! :wave:
Welcome to the Jupyter community! :tada:

JasonWeill commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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: https://github.com/git-learning-game/oh-my-git/issues/23#issuecomment-995987919

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 commented 1 year ago

@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 commented 1 year ago

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 commented 1 year ago

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 commented 2 weeks ago
  • 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.