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

bashrc disappear in the k8s deployment #347

Closed
unkcpz opened this issue Dec 14, 2022 · 5 comments · Fixed by #353
Closed

bashrc disappear in the k8s deployment #347

unkcpz opened this issue Dec 14, 2022 · 5 comments · Fixed by #353
Assignees

Comments

@unkcpz
Copy link
Member

unkcpz commented Dec 14, 2022

In the THEOS deployment, it is weird that the .bashrc is not there after the server start. @danielhollas do you have the same issue in your development?
Luckily most of the things work fine, just the verdi completion is not working at the moment since the base conda environment is not activated.

@danielhollas
Copy link
Contributor

I haven't seen this issue, but I am only using aiidalab-launch

@unkcpz
Copy link
Member Author

unkcpz commented Dec 14, 2022

Yes, the aiidalab-launch has no issue.

@unkcpz
Copy link
Member Author

unkcpz commented Dec 16, 2022

I think I find the catch of this issue. Running the container locally by docker run or using aiidalab-launch will start the container by start-notebook.sh, while starting container each user by spawned from jupyterhub on k8s and ansible deployment the container is started by start-singleuser.sh. The difference can be find:

This explains the issues I and @yakutovicha encountered that the environment variable DOCKER_STACKS_JUPYTER_CMD set in the lab stack didn't take effect.
I need more investigation where the bash profile is set or wiped.

@unkcpz
Copy link
Member Author

unkcpz commented Dec 16, 2022

Here is a relevant discussion how to properly using start-singleuser.sh. jupyter/docker-stacks#1528, and a dedicate issue open at jupyter/docker-stacks#1848

@unkcpz
Copy link
Member Author

unkcpz commented Jan 4, 2023

I did some investigation and think the problem caused from that the k8s deployment (also the ansible deployment) where the home is mounted after the spawner will wipe the configurations setted such as the .bashrc and .vimrc. It mentioned in the issue jupyter/docker-stacks#815 (comment).

This means in our docker stack we need to avoid modifying the ~/.bashrc directly but /etc/skel/bashrc and copy it to ~/.bashrc afterward in before-notebook.d.

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

Successfully merging a pull request may close this issue.

2 participants