-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Customizing Dockerfile #1425
Comments
@dlsun So the default image in the helm-chart (zero-to-jupyterhub) is this one built with this Dockerfile here: https://github.com/jupyterhub/helm-chart/blob/master/images/singleuser-sample/Dockerfile You will need to structure your own image in a broadly similar way ... in terms of installing jupyterhub on the image itself (you'll probably need version 0.7.2). Also note the creation of user jovyan and exposing port 8888 etc, as per that default Dockerfile. Try to align your Dockerfile structure as much to this default one as you can, allowing for the fact that you may be building from a different base and installing other packages. You will then have to over-ride the default helm-chart with your new image. To do that, you add it to your https://github.com/jupyterhub/helm-chart/blob/master/jupyterhub/templates/hub/deployment.yaml#L56 So your config.yaml file will have a section something like this:
|
@dlsun that error indicates that you are probably using a really old version of docker-stacks as base. jupyter/docker-stacks@2d878db looks like it's from mid-2016. Can you use a newer base image? docker-stacks images older than a few months will give this error. |
@Analect Since my base is jupyter/scipy-notebook, shouldn't I already have everything that is in that default Dockerfile? @yuvipanda I changed to jupyter/scipy-notebook:latest and I'm getting the same error. :-( |
Can you add a 'WORKDIR $HOME' to the end of your Dockerfile? |
@yuvipanda I'm still getting the same error message. |
To be clear, my Dockerfile now looks like:
|
hmm, can you share your config.yaml? Also are you sure the new docker image is being used? Did you build and push a new tag with it? |
@yuvipanda Thanks for helping me with this. I ran the following command (from the directory with the Dockerfile) to build the image: Then I pushed the image to Google Cloud Registry: Here is the
which I upgrade by running the following command (from the directory containing config.yaml): |
Can you try using an explicit tag instead of 'latest'? so you'd do: docker build . -t us.gcr.io/stat-350/symbulate: and then gcloud docker -- push us.gcr.io/stat-350/symbulate: and put that tag in singleuser.image instead of 'latest'? Also can you try running the image manually after building it to see if that works? You can do that with:
and tell me what that produces? |
Thanks for all the help. I ended up deleting my Google Cloud container and making it from scratch, and that seems to have fixed the problem. |
I followed the Zero to JupyterHub tutorial and was able to get a running instance of JupyterHub on Google Cloud. Thanks so much for this awesome tutorial. It was very easy to follow for a complete novice like me.
I'm now trying to customize the image. I would like to pull Python code from Github and install the package. I tried creating a Dockerfile with the following contents:
The Dockerfile builds without any problem. I'm even able to apply the config changes using helm. The problem comes when I actually try to log in to JupyterHub (I'm using Github authentication) and start up my server. I get the error:
Any ideas on what I should do?
The text was updated successfully, but these errors were encountered: