From 1885365d25707bd8c1cc608ca2a13758edf56d65 Mon Sep 17 00:00:00 2001 From: Dr John Vidler Date: Mon, 26 Feb 2024 22:51:14 +0000 Subject: [PATCH] Attempt to build a valid notebook based on https://jupyterhub-dockerspawner.readthedocs.io/en/latest/docker-image.html\#how-to-build-your-own-docker-image --- jupyter/python-cuda-535/Dockerfile | 32 +++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/jupyter/python-cuda-535/Dockerfile b/jupyter/python-cuda-535/Dockerfile index 3715e41..04e8e7a 100644 --- a/jupyter/python-cuda-535/Dockerfile +++ b/jupyter/python-cuda-535/Dockerfile @@ -4,23 +4,37 @@ ENV DEBIAN_FRONTEND noninteractive USER root RUN apt-get update && apt-get upgrade -y && apt-get install -y \ + python3.10-venv \ + build-essential \ + python3-dev \ + curl \ git \ vim \ - build-essential \ - software-properties-common\ - python3.10-venv + nano-tiny \ + tzdata \ + unzip \ + vim-tiny \ + openssh-client \ + less \ + texlive-xetex \ + texlive-fonts-recommended \ + texlive-plain-generic \ + xclip && \ + apt-get clean && rm -rf /var/lib/apt/lists/* + +RUN update-alternatives --install /usr/bin/nano nano /bin/nano-tiny 10 RUN useradd -ms /bin/bash jovyan +ENV HOME=/home/jovyan +WORKDIR $HOME USER jovyan -WORKDIR /home/jovyan/work ENV VIRTUAL_ENV=/home/jovyan/.venv RUN python3 -m venv $VIRTUAL_ENV ENV PATH="$VIRTUAL_ENV/bin:$PATH" -RUN pip3 install --upgrade pip && \ - pip3 install -U pip setuptools wheel JPype1 jupyter pandas numpy seaborn scipy matplotlib pyNetLogo SALib && \ - pip3 install -U 'spacy[cuda11x]' +RUN pip3 install \ + 'jupyterhub==4.*' \ + 'notebook==7.*' -EXPOSE 8888 -ENTRYPOINT ["jupyter", "notebook","--allow-root","--ip=0.0.0.0","--port=8888","--no-browser"] \ No newline at end of file +CMD ["jupyterhub-singleuser"] \ No newline at end of file