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

Allow installing system packages into jupyter-labs #441

Open
mguidon opened this issue Mar 26, 2021 · 7 comments
Open

Allow installing system packages into jupyter-labs #441

mguidon opened this issue Mar 26, 2021 · 7 comments
Assignees

Comments

@mguidon
Copy link
Member

mguidon commented Mar 26, 2021

Long story short

jovyan is not in the sudoer group. Nobody can use the package manager. Once we are completely isolated (dynamic sidecar) we might allow that. There are several options:

  1. Enable it always
  2. Enable it via GRANT_SUDO=yes
  3. Have a hook in the containers entrypoint that reads the packages to be installed from a file.

The latter would make it persistent. This came in via discussion with @colinRawlings

@mguidon mguidon added the Feedback Feedback through frontend label Mar 26, 2021
@pcrespov pcrespov removed the Feedback Feedback through frontend label Jun 9, 2022
@sanderegg sanderegg removed their assignment Nov 14, 2022
@pcrespov pcrespov assigned elisabettai and unassigned pcrespov Apr 8, 2024
@pcrespov
Copy link
Member

pcrespov commented Apr 8, 2024

Ello. To consider in your new cookie cutter? Otherwise pls close

@elisabettai
Copy link
Contributor

elisabettai commented Apr 11, 2024

@pcrespov, I'd like to have a look to this, yes, but I won't go into the direction of giving the standard jupyterlab user (jovyan) root access.

I think the way to go would be to set pip (or conda, or what we need for R and Julia) so that the jovyan user installs things in a specific directory under workspace. So when the oSPARC users come back to their study, they will find their environments and packages without the need to reinstall.

The main caveat I have in mind is that the workspace will easily grow very big and then the study might take long to open, up to the point when the current behavior (i.e. installing packages all the time) is more efficient than "saving" the packages in workspace. I might miss some details, or maybe @GitHK has some other caveats in mind.

@GitHK
Copy link
Contributor

GitHK commented Apr 11, 2024

Regarding root access. I would not go into that direction at all. If people are concern of having web applications running as root access. Immagine how bad it is if the user of the jupuyter-lab has a terminal with root access.

Regarding installing packages. I'm not sure how we might end up guaranteeing that the correct data is backed up. I think the current situation (people always install dependencies) is still the way to go.
If they want something special they ask or create a new service with the dependencies installed.

@pcrespov
Copy link
Member

@elisabettai AFAIK now we control the size of the workspace folder. In that sense, i do not see a difference between having extra packages installed vs having more data files in the workspace folder. So for the moment I would go that way.

@mguidon
Copy link
Member Author

mguidon commented Apr 11, 2024

I think this issue was more meant for system packages (e.g. apt, but that might be dangerous) For python packages, can we do some measurements?

  1. pip install from scratch into non-workspace
  2. pip install into workspace
  3. pip install using cache that is in workspace (i guess those a tarballs)
  4. same thing with uv

@elisabettai
Copy link
Contributor

elisabettai commented Apr 11, 2024

Also, for a bit more context, in the cookiecutter for Jupyters that I am making, users can setup their environments in python, R or Julia, by providing a requirement file, so they can build a service with whatever dependencies they want (and customize the Dockerfile if needed).

I am not sure I fully understand the 3 points you mention @mguidon, but we can discuss offline.

And I was not aware we control the size of workspace, how big is it e.g. for jupyter-math on osparc.io, @GitHK?

@mguidon
Copy link
Member Author

mguidon commented Apr 11, 2024

We control the workspace only for s4l-lite

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

6 participants