plasmabio / tljh-repo2docker

Plugin for The Littlest JupyterHub to build multiple user environments with repo2docker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dockerfile

Grindayzer opened this issue · comments

Hi,
I am trying to run an envrionment with a dockerfile based on the image
jupyterhub/singleuser

After adding the lines at the beginning of the dockerfile, after FROM ...

LABEL repo2docker.ref="master"
LABEL repo2docker.repo="https://xxxx/jhub/octave"
LABEL repo2docker.version="0.11.0+54.gbbc3ee0"
LABEL tljh_repo2docker.mem_limit=""
LABEL tljh_repo2docker.cpu_limit=""
LABEL tljh_repo2docker.display_name="octave"
LABEL tljh_repo2docker.image_name="octave:master"

the environment appears in the main table
image

But when I try to spawn the environment, I have this issue

image

with his log
[FATAL tini (6)] exec /srv/conda/envs/notebook/bin/jupyterhub-singleuser failed: No such file or directory

Please how I can resolve this ?

Thank you,

Rafik

Thanks Rafik for opening the issue.

I think tljh-repo2docker for now assumes jupyterhub is installed in the docker image:

c.DockerSpawner.cmd = ["jupyterhub-singleuser"]

Similar to the plasma config here: https://github.com/plasmabio/plasma/blob/7883a6a1266b69ab49f353bdf9974be408bf0709/tljh-plasma/tljh_plasma/__init__.py#L123

If it's a custom Docker image with a custom Dockerfile, maybe it's possible to install jupyterhub, and point c.DockerSpawner.cmd to where jupyterhub-singleuser is located?

Hi Jeremy,
Thank's for the reply.

In tljh_repo2docker/__init__.py the DockerSpawner is enabled
c.DockerSpawner.cmd = ["jupyterhub-singleuser"]

then I have to install jupyterhub in the sytem ? Or by docker ?

This is not going to affect the actual setup ?

then I have to install jupyterhub in the sytem ? Or by docker ?

In the Docker image (user environment). Normally a custom Dockerfile should also have the notebook or jupyterlab dependency to start the Jupyter server as the CMD.

Linking to the Binderhub documentation which might provide more information: https://mybinder.readthedocs.io/en/latest/tutorials/dockerfile.html

This is not going to affect the actual setup ?

It should only affect the user environment built with the custom Dockerfile.

I had the same issue, any image I wanted to start just timed out after 30s just like you. I added these 2 lines into my jupyterhub_config.py, restarted jupyterhub and images now load and run flawlesly

c.Spawner.http_timeout = 3600
c.Spawner.start_timeout = 3600

@Grindayzer mind sharing a sample Dockerfile, so it's easier to test and reproduce? Thanks!

Looks like the change by @TimoRoth in #48 might fix this issue, as labels would then be handled natively by repo2docker.

Closing as this should now be fixed by #48.

And can be tested with the following template: https://github.com/plasmabio/template-dockerfile. This template adds the jupyterhub~=1.0 dependency to the image so it can be used with TLJH / JupyterHub: https://github.com/plasmabio/template-dockerfile/blob/88b2f78557d4f4d3686b9d447d2c0dd3c3d236f5/Dockerfile#L4

Feel free to reopen or open a new one if you are still experiencing issues. Thanks!