From 258437885490e43e71c5c1b1548bc1fb4807519a Mon Sep 17 00:00:00 2001 From: blackheaven <22-blackheaven@biblio19.net> Date: Mon, 2 Oct 2023 11:06:19 +0900 Subject: [PATCH] Update 3 files - /Dockerfile - /.gitlab-ci.yml - /docker-compose.yml --- .gitlab-ci.yml | 2 +- Dockerfile | 18 ++++++++++-------- docker-compose.yml | 2 +- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index da61766..6ecd656 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,7 +8,7 @@ stages: variables: CI_REGISTRY: registry.biblio19.net:5005 - IMAGE_TAG: $CI_REGISTRY/school/capstone-design/02/jupyterhub-gpu:init + IMAGE_TAG: $CI_REGISTRY/school/capstone-design/02/jupyterhub-gpu before_script: - echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER $CI_REGISTRY --password-stdin diff --git a/Dockerfile b/Dockerfile index 66154b3..fa79df8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,18 +14,20 @@ 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 sudospawner tensorflow jupyterhub-ldapauthenticator dockerspawner -RUN python3 -m pip install --no-cache-dir jupyterlab-git pandas seaborn beautifulsoup4 bokeh h5py ipympl scipy ipywidgets folium +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 -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 -CMD ["sudo", "-u", "rhea", "jupyterhub", "--JupyterHub.spawner_class=sudospawner.SudoSpawner"] +CMD [ "jupyterhub", "-f" ,"/etc/jupyterhub/jupyterhub_config.py"] diff --git a/docker-compose.yml b/docker-compose.yml index cdfe91a..e81689e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,7 +10,7 @@ services: - ${PWD}/home:/home - ${PWD}/share:/share - ./passwd/sudoers:/etc/sudoers - image: 'jupyterhub-test' + image: 'registry.biblio19.net/school/capstone-design/02/jupyterhub-gpu' restart: always #devices: # - /dev/nvidia0:/dev/nvidia0 -- GitLab