Closed unkcpz closed 1 year ago
I haven't seen this issue, but I am only using aiidalab-launch
Yes, the aiidalab-launch
has no issue.
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:
start-singleuser.sh
: https://github.com/jupyter/docker-stacks/blob/10e52ee84369aaa37630aea13c137b766ace307b/base-notebook/start-singleuser.shstart-notebook.sh
: https://github.com/jupyter/docker-stacks/blob/10e52ee84369aaa37630aea13c137b766ace307b/base-notebook/start-notebook.shThis 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.
Here is a relevant discussion how to properly using start-singleuser.sh. https://github.com/jupyter/docker-stacks/issues/1528, and a dedicate issue open at https://github.com/jupyter/docker-stacks/issues/1848
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 https://github.com/jupyter/docker-stacks/issues/815#issuecomment-478363912.
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
.
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 thebase
conda environment is not activated.