diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ba06c27d2c835331f3779fd7d5be4ca0f3a02188..da617666811a0758fde1e08418f70dccdc434f6e 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: - - echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER $CI_REGISTRY --password-stdin - docker build -t $IMAGE_TAG . --no-cache - - docker push $IMAGE_TAG \ No newline at end of file + +push: + stage: push + script: + - docker push $IMAGE_TAG + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index cfe23226075dbd744a6016a756a41955f7e0db23..30a1900d43d987bcdd43ab59b7fe1627bf7348bd 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