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

Dockerfile #45

Closed
Grindayzer opened this issue Mar 4, 2021 · 7 comments
Closed

Dockerfile #45

Grindayzer opened this issue Mar 4, 2021 · 7 comments

Comments

@Grindayzer
Copy link

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

@jtpio
Copy link
Member

jtpio commented Mar 4, 2021

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?

@Grindayzer
Copy link
Author

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 ?

@jtpio
Copy link
Member

jtpio commented Mar 5, 2021

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

@jtpio
Copy link
Member

jtpio commented Mar 5, 2021

This is not going to affect the actual setup ?

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

@nikl11
Copy link

nikl11 commented Aug 6, 2021

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

@jtpio
Copy link
Member

jtpio commented Dec 2, 2021

@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.

@jtpio
Copy link
Member

jtpio commented Dec 31, 2021

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!

@jtpio jtpio closed this as completed Dec 31, 2021
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

3 participants