From 9a5668278144a517e6fb0b946b601b9dba22fa93 Mon Sep 17 00:00:00 2001 From: blackheaven <22-blackheaven@biblio19.net> Date: Mon, 2 Oct 2023 11:31:07 +0900 Subject: [PATCH] Add requirements & resolved permission problem --- Dockerfile | 19 ++++++++----------- requirements.txt | 18 ++++++++++++++++++ 2 files changed, 26 insertions(+), 11 deletions(-) create mode 100644 requirements.txt diff --git a/Dockerfile b/Dockerfile index fa79df8..e8e308e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,20 +14,17 @@ RUN apt-get update -qq \ && rm -rf /var/lib/apt/lists/* RUN npm install -g configurable-http-proxy -RUN python3 -m pip install --no-cache-dir jupyterhub jupyterlab jupyterlab-git sudospawner tensorflow jupyterhub-ldapauthenticator -RUN python3 -m pip install --no-cache-dir pandas seaborn beautifulsoup4 bokeh h5py ipympl scipy ipywidgets folium +COPY requirements.txt requirements.txt +RUN python3 -m pip install --no-cache-dir -r requirements.txt +RUN rm requirements.txt -# RUN groupadd jupyterhub -# RUN useradd -rm -d /home/rhea -s /bin/bash -G sudo -u 1000 -g jupyterhub rhea -# RUN usermod -aG shadow rhea +RUN groupadd jupyterhub +RUN useradd -rm -d /home/rhea -s /bin/bash -G sudo -u 1000 -g jupyterhub rhea +RUN usermod -aG shadow rhea RUN mkdir /etc/jupyterhub -# RUN chown rhea /etc/jupyterhub +RUN chown rhea /etc/jupyterhub WORKDIR /etc/jupyterhub - -RUN jupyterhub --generate-config -f /etc/jupyterhub/jupyterhub_config.py - -# USER rhea -# RUN sudo -u rhea jupyterhub --generate-config +RUN sudo -u rhea jupyterhub --generate-config -f /etc/jupyterhub/jupyterhub_config.py CMD [ "jupyterhub", "-f" ,"/etc/jupyterhub/jupyterhub_config.py"] diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..424f275 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,18 @@ +# Jupyter +jupyterhub +jupyterlab +jupyterlab-git +sudospawner +jupyterhub-ldapauthenticator + +# others +tensorflow +pandas +seaborn +beautifulsoup4 +bokeh +h5py +ipympl +scipy +ipywidgets +folium \ No newline at end of file -- GitLab