From dd28707c086ff4d9dc706c4f727f8cebd618b5b3 Mon Sep 17 00:00:00 2001 From: blackheaven <22-blackheaven@biblio19.net> Date: Sun, 1 Oct 2023 23:26:15 +0900 Subject: [PATCH 1/3] Add python module --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index cfe2322..30a1900 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,8 +14,8 @@ 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 -RUN python3 -m pip install --no-cache-dir jupyterlab-git pandas seaborn beautifulsoup4 bokeh h5py ipympl scipy ipywidgets +RUN python3 -m pip install --no-cache-dir jupyterhub jupyterlab sudospawner tensorflow jupyterhub-ldapauthenticator +RUN python3 -m pip install --no-cache-dir jupyterlab-git 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 -- GitLab From 0f6cc847d28f141deb80c26b9f28bba73af3fa71 Mon Sep 17 00:00:00 2001 From: blackheaven <22-blackheaven@biblio19.net> Date: Sun, 1 Oct 2023 23:30:06 +0900 Subject: [PATCH 2/3] Del --no-cache option --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ba06c27..2126224 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,5 +8,5 @@ build: IMAGE_TAG: $CI_REGISTRY/school/capstone-design/02/jupyterhub-gpu:init script: - echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER $CI_REGISTRY --password-stdin - - docker build -t $IMAGE_TAG . --no-cache + - docker build -t $IMAGE_TAG . - docker push $IMAGE_TAG \ No newline at end of file -- GitLab From 9f098b5c838b86456ef49055179fb7a989b4b5e8 Mon Sep 17 00:00:00 2001 From: blackheaven <22-blackheaven@biblio19.net> Date: Mon, 2 Oct 2023 00:09:00 +0900 Subject: [PATCH 3/3] Only push main branch --- .gitlab-ci.yml | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2126224..da61766 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,12 +1,25 @@ -build: - image: docker - stage: build - services: +image: docker +services: - docker:dind - variables: - CI_REGISTRY: registry.biblio19.net:5005 - IMAGE_TAG: $CI_REGISTRY/school/capstone-design/02/jupyterhub-gpu:init + +stages: + - build + - push + +variables: + CI_REGISTRY: registry.biblio19.net:5005 + IMAGE_TAG: $CI_REGISTRY/school/capstone-design/02/jupyterhub-gpu:init +before_script: + - echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER $CI_REGISTRY --password-stdin + +build: + stage: build + script: + - docker build -t $IMAGE_TAG . --no-cache + +push: + stage: push script: - - echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER $CI_REGISTRY --password-stdin - - docker build -t $IMAGE_TAG . - - docker push $IMAGE_TAG \ No newline at end of file + - docker push $IMAGE_TAG + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH \ No newline at end of file -- GitLab