Create custom image with Kubeflow jupyter default interface

  docker, jupyter, kubeflow

I would like to know how to create a custom jupyter image with the launcher interface that comes default with kubeflow installation.

Following tutorials in official kubeflow documentation I was able to generate a custom image with default jupyter interface.

defaultinterface

But I would like to create with kubeflow jupyter default interface:

webappkueflow

I couldn’t find a tutorial that uses the base image from this link, that is the image that has the modified interface:
image

I too tried to use image contained in this link as base image, named jupyter-web-app, but it only generated an image that does not load the jupyter interface, after pointing a jupyter notebook server to start pointing to this image, I only receive error: ‘no healthy upstream’ It does not load at all.

I think it is related to the way it starts the container that is different from kubeflow documentation to create a custom image:

Documentation states it should contain this default CMD:

ENV NB_PREFIX /

CMD ["sh","-c", "jupyter notebook --notebook-dir=/home/jovyan --ip=0.0.0.0 --no-browser --allow-root --port=8888 --NotebookApp.token='' --NotebookApp.password='' --NotebookApp.allow_origin='*' --NotebookApp.base_url=${NB_PREFIX}"]

jupyter-web-app has:

ENTRYPOINT ["python3"]
CMD ["main.py"]

Are there a base image to build my custom image with jupyter kubeflow default interface? (I know in terms of functionality they do the same work, but it is for usability [do not break user experience]).

Here is my Dockerfile:

# Base image Dockerfile (AWS Deep Learning Containers)
# https://github.com/aws/deep-learning-containers/blob/master/tensorflow/training/docker/2.2.0/py3/Dockerfile.cpu

FROM gcr.io/kubeflow-images-public/[email protected]:87c49f386263b8b3f4ba104617b888a97dad4dd166984c1e1d679435f1763ba1

# Install python3 packages from requirements file. Don’t install package dependencies.
# Run 'pip3 check' to verify if installed packages have compatible dependencies.
COPY requirements.txt /tmp

RUN pip3 --no-cache-dir install --no-deps --requirement /tmp/requirements.txt && 
    pip3 check || true

COPY custom_ssh_key /home/root/.ssh/id_rsa
COPY custom_ssh_key.pub /home/root/.ssh/id_rsa.pub

WORKDIR /root
ENV NB_PREFIX /
ENTRYPOINT ["tini", "--"]

CMD ["sh","-c", "jupyter notebook --notebook-dir=/home/${NB_USER} --ip=0.0.0.0 --no-browser --allow-root --port=8888 --NotebookApp.token='' --NotebookApp.password='' --NotebookApp.allow_origin='*' --NotebookApp.base_url=${NB_PREFIX}"]

Using this Dockerfile i was able to generate a working image, but I want to change the default interface.

Source: Docker Questions

LEAVE A COMMENT