Closed njacobson-nci closed 9 months ago
It appears that mounting a volume to $NB_USER/work will cause a failure in before-notebook.d init.sh.
If "${NB_USER}" != "jovyan"
, any folder mounted in "/home/${NB_USER}"
will prevent the startup from succeeding.
👉 This is because of https://github.com/b-data/jupyterlab-python-docker-stack/blob/35b38bc63d3920e204200ad07eace6c39d2b5934/base/scripts/usr/local/bin/start.sh#L128
The bind mounted home directory is only populated if it is empty.
That's one of many reasons why I'm building my own Jupyter docker stack incorporating the changes listed above and mounting the entire home directory.
Figure it's worth documenting at least so others don't have to debug it.
Will do.
That also precludes having any data in the host mounting location as well. Is the solution to mount a working directory to another location?
That also precludes having any data in the host mounting location as well.
Correct. Bind mounting is only supported for empty folders.
Is the solution to mount a working directory to another location?
I suggest mounting any other [host] folder as a subfolder of /mnt
in the container.
ℹ️ Filesystem Hierarchy Standard > ... > 3.12. /mnt : Mount point for a temporarily mounted filesystem
I had the following in mind:
~/projects
is the so called working directory.
/mnt
, in data bases, via Hadoop, via Spark, etc.[^1]: An exception may be made for small sample data sets.
@njacobson-nci Is https://github.com/b-data/jupyterlab-python-docker-stack/blob/main/CUDA.md#run-container OK?
If yes, please close this issue.
Yeah thanks for documenting that!
❗ Bind mounting a subfolder of the home directory is only possible for images with Python version ≥ 3.12.2.
It appears that mounting a volume to $NB_USER/work will cause a failure in before-notebook.d init.sh.
The only change between these two commands is the volume mounting location inside the container. I removed everything except the bare minimum from the commands I'm running to see what causes the failure. Even explicitly setting the workdir to /home/njacobson or /home/jovyan fails.
It's not an unworkable issue, but it is strange and it's not specific to the work/ folder name. Figure it's worth documenting at least so others don't have to debug it.
Love the repo though, really great work.