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

Support configuring the user environment #297

Open
csadorf opened this issue Sep 15, 2022 · 5 comments
Open

Support configuring the user environment #297

csadorf opened this issue Sep 15, 2022 · 5 comments
Labels

Comments

@csadorf
Copy link
Member

csadorf commented Sep 15, 2022

With the adoption of the jupyter/minimal-notebook as the base image for this stack, the user name can be controlled via the NB_USER environment variable in combination with running the container as root user.

However, this function is currently not supported in the current edge version, likely because of this documented bug that was apparently fixed in more recent versions of the Jupyter stack. We are currently forced to depend on older version due to dependency conflicts.

@csadorf csadorf added the bug label Sep 15, 2022
csadorf added a commit to aiidalab/aiidalab-launch that referenced this issue Sep 15, 2022
Selecting a different user is currently creating problems, see
aiidalab/aiidalab-docker-stack#297 .
csadorf added a commit to aiidalab/aiidalab-launch that referenced this issue Sep 15, 2022
Selecting a different user is currently creating problems, see
aiidalab/aiidalab-docker-stack#297 .
csadorf added a commit to aiidalab/aiidalab-launch that referenced this issue Sep 15, 2022
Selecting a different user is currently creating problems, see
aiidalab/aiidalab-docker-stack#297 .
csadorf added a commit to aiidalab/aiidalab-launch that referenced this issue Sep 15, 2022
Selecting a different user is currently creating problems, see
aiidalab/aiidalab-docker-stack#297 .
csadorf added a commit to aiidalab/aiidalab-launch that referenced this issue Sep 15, 2022
Selecting a different user is currently creating problems, see
aiidalab/aiidalab-docker-stack#297 .
csadorf added a commit to aiidalab/aiidalab-launch that referenced this issue Sep 29, 2022
* Switch to 'aiidalab/full-stack:latest' as default image.

* Switch to jovyan as the default user.

Selecting a different user is currently creating problems, see
aiidalab/aiidalab-docker-stack#297 .

* Fix debug message w.r.t. the ~/.conda directory.

* Skip check if wait-for-services script is not present.

Script is not provided on the full-stack image.

* Test against the old and the revised image.

Allow test parametrization w.r.t. the default image.

* CI: Increase test timeout.
@danielhollas
Copy link
Contributor

Just noting my observation that might be relevant to this: Trying to run the full-stack image under root currently fails with:

/usr/local/bin/start-notebook.sh: running /usr/local/bin/before-notebook.d/20_start-postgres.sh
ERROR conda.cli.main_run:execute(33): Subprocess for 'conda run ['initdb', '-D', '/home/jovyan/.postgresql']' command failed.  (See above for error)
initdb: error: cannot be run as root
Please log in (using, e.g., "su") as the (unprivileged) user that will
own the server process.

@unkcpz
Copy link
Member

unkcpz commented Oct 13, 2022

I think the problem is the NB_USER can be set only with --user root. This will break up running all the startup hooks. Because the startup hooks in before-notebook.py are all supposed to be run as the system user rather than the root.

@danielhollas
Copy link
Contributor

@unkcpz yep, that's exactly right. I provided more details in #306 if you're interested.

@unkcpz
Copy link
Member

unkcpz commented Oct 13, 2022

@danielhollas thanks! that's very helpful. But there is still no proper way to do it without hacking the start.sh I guess?

@danielhollas
Copy link
Contributor

Yeah, I don't think there is right now. I am okay with that since I am building my own Docker image anyway.

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

No branches or pull requests

3 participants