From f061f1d9e429edccd475ee59f0c5b9fde871b49d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Y=C3=BBki=20Vachot?= Date: Fri, 22 Oct 2021 06:30:10 +0200 Subject: [PATCH] Create Dockerfile from https://github.com/KienMN/JupyterHub-on-Kubernetes/blob/master/images/jupyter-hub/Dockerfile --- Dockers/tensorflow-jupyterhub/Dockerfile | 62 ++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 Dockers/tensorflow-jupyterhub/Dockerfile diff --git a/Dockers/tensorflow-jupyterhub/Dockerfile b/Dockers/tensorflow-jupyterhub/Dockerfile new file mode 100644 index 0000000..dc95d21 --- /dev/null +++ b/Dockers/tensorflow-jupyterhub/Dockerfile @@ -0,0 +1,62 @@ +FROM ubuntu:18.04 + +ARG JUPYTERHUB_VERSION=1.1.0 + +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + git \ + vim \ + less \ + python3 \ + python3-dev \ + python3-pip \ + python3-setuptools \ + python3-wheel \ + libssl-dev \ + libcurl4-openssl-dev \ + build-essential \ + sqlite3 \ + curl \ + dnsutils \ + $(bash -c 'if [[ $JUPYTERHUB_VERSION == "git"* ]]; then \ + # workaround for https://bugs.launchpad.net/ubuntu/+source/nodejs/+bug/1794589 + echo nodejs=8.10.0~dfsg-2ubuntu0.2 nodejs-dev=8.10.0~dfsg-2ubuntu0.2 npm; \ + fi') \ + && \ + apt-get purge && apt-get clean + +ARG NB_USER=jovyan +ARG NB_UID=1000 +ARG HOME=/home/jovyan + +ENV LANG C.UTF-8 + +RUN adduser --disabled-password \ + --gecos "Default user" \ + --uid ${NB_UID} \ + --home ${HOME} \ + --force-badname \ + ${NB_USER} + +ADD requirements.txt /tmp/requirements.txt +ADD jupyterhub_config.py /srv/jupyterhub/jupyterhub_config.py + +RUN PYCURL_SSL_LIBRARY=openssl pip3 install --no-cache-dir \ + -r /tmp/requirements.txt \ + $(bash -c 'if [[ $JUPYTERHUB_VERSION == "git"* ]]; then \ + echo ${JUPYTERHUB_VERSION}; \ + else \ + echo jupyterhub==${JUPYTERHUB_VERSION}; \ + fi') + +WORKDIR /srv/jupyterhub + +# So we can actually write a db file here +RUN chown ${NB_USER}:${NB_USER} /srv/jupyterhub + +# JupyterHub API port +EXPOSE 8081 + +USER ${NB_USER} +#CMD ["jupyterhub"] +CMD ["jupyterhub", "--config", "/srv/jupyterhub/jupyterhub_config.py"]