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

Use the same system user to launch the user's Docker Spawner container #97

Open
Tianhao-Gu opened this issue Sep 23, 2024 · 1 comment

Comments

@Tianhao-Gu
Copy link
Collaborator

Explore alternatives to not creating system users with the same name as JupyterHub users, while ensuring the same system user is used to launch the user's Docker container. This is to ensure Yarn's fair share to function correctly.

@bio-boris
Copy link
Contributor

A possible solution is to write a startup script that retrieves the JupyterHub user's name from the environment variable and injects it into the Spark configuration file. This will ensure that the correct system user is used without having to create duplicate system users.

#!/bin/bash
USER_NAME=${JUPYTERHUB_USER:-"default_user"}
sed -i "s/YARN_USER/$USER_NAME/" /path/to/spark/conf/spark-defaults.conf

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

2 participants