From 89f11a75f0715d46b934075c584ef488fe0d8919 Mon Sep 17 00:00:00 2001 From: Leonardo Cristella Date: Mon, 25 Nov 2024 17:55:16 +0100 Subject: [PATCH] Publish Dockerfile --- .github/workflows/on_tag.yml | 23 ++++++++++++++++++- Dockerfile | 43 ++++++++++++++++-------------------- 2 files changed, 41 insertions(+), 25 deletions(-) diff --git a/.github/workflows/on_tag.yml b/.github/workflows/on_tag.yml index a74099e..5ce3d8e 100644 --- a/.github/workflows/on_tag.yml +++ b/.github/workflows/on_tag.yml @@ -25,5 +25,26 @@ jobs: - name: Publish distribution package to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: - password: ${{ secrets.PYPI_API_TOKEN }} + #password: ${{ secrets.PYPI_API_TOKEN }} verbose: true + + deploy_docker_image: + env: + REGISTRY_IMAGE_TAG: $GITHUB_REF_NAME + CI_REGISTRY_IMAGE: bluebrain/bbp-atlas-pipeline + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@master + + - name: Docker Hub Login + uses: docker/login-action@v3 + with: + username: ${{ vars.BBPBUILDBOT_DOCKERHUB_USER }} + password: ${{ secrets.BBPBUILDBOT_DOCKERHUB_PASSWORD }} + + - name: Build and Push Docker Image + uses: docker/build-push-action@v6 + with: + push: true + tags: bluebrain/bbp-atlas-pipeline:$GITHUB_REF_NAME diff --git a/Dockerfile b/Dockerfile index 7a03596..de5eef3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,5 @@ FROM python:3.10-slim -ARG CI_JOB_TOKEN -ARG BBP_CA_CERT - RUN apt-get update && \ DEBIAN_FRONTEND="noninteractive" TZ="Europe/Zurich" apt-get install -y tzdata && \ apt-get install -y --no-install-recommends \ @@ -27,39 +24,25 @@ COPY .. . # export PATH=$PATH:$PWD/build/bin # Install the pipeline repository (along with the bbp-atlas CLI) -RUN pip install -i https://bbpteam.epfl.ch/repository/devpi/simple/ blue_brain_atlas_pipeline/ +RUN pip install blue_brain_atlas_pipeline/ -# For install dependencies -RUN git config --global --add url."https://gitlab-ci-token:${CI_JOB_TOKEN}@bbpgitlab.epfl.ch/".insteadOf https://bbpgitlab.epfl.ch/ +# Install dependencies # module load py-token-fetch -RUN pip install -i https://bbpteam.epfl.ch/repository/devpi/simple/ "blue-brain-token-fetch>=1.0.0" +RUN pip install "blue-brain-token-fetch>=1.0.0" # module load py-bba-datafetch -RUN pip install -i https://bbpteam.epfl.ch/repository/devpi/simple/ "bba-data-fetch>=0.3.0" - -# densities validation -RUN pip install -i https://bbpteam.epfl.ch/repository/devpi/simple/ "densities-validation>=0.1.1" - -# leaves-only -RUN pip install -i https://bbpteam.epfl.ch/repository/devpi/simple/ "cell-densities>=0.2.1" +RUN pip install git+https://github.com/BlueBrain/bbp-atlas-data-fetch.git@v0.3.0 # module load py-bba-webexporter -RUN pip install -i https://bbpteam.epfl.ch/repository/devpi/simple/ "blue-brain-atlas-web-exporter>=3.0.0" - -# module load py-data-integrity-check -RUN pip install -i https://bbpteam.epfl.ch/repository/devpi/simple/ "bba-data-integrity-check>=0.2.0" +RUN pip install git+https://github.com/BlueBrain/bbp-atlas-web-exporter.git@v3.0.0 RUN pip install blue-cwl # module load py-bba-data-push -RUN pip install -i https://bbpteam.epfl.ch/repository/devpi/simple/ "bba-data-push>=4.3.0" +RUN pip install "blue-brain-data-push>=4.3.0" -RUN pip install git+https://bbpgitlab.epfl.ch/dke/users/jonathanlurie/atlas_cell_transplant.git@v0.3.1 - -RUN pip install -i https://bbpteam.epfl.ch/repository/devpi/simple/ "pipeline-validator>=0.3.1" - -RUN git config --global --remove-section url."https://gitlab-ci-token:${CI_JOB_TOKEN}@bbpgitlab.epfl.ch/" +RUN pip install "bbp-atlas-pipeline-validator>=0.3.1" RUN pip install "atlas-commons>=0.1.5" @@ -72,3 +55,15 @@ RUN pip install "atlas-placement-hints>=0.1.4" RUN pip install "atlas-densities>=0.2.5" RUN pip install "snakemake==7.32.3" + + +ARG CI_JOB_TOKEN +RUN git config --global --add url."https://gitlab-ci-token:${CI_JOB_TOKEN}@bbpgitlab.epfl.ch/".insteadOf https://bbpgitlab.epfl.ch/ + +# densities validation +RUN pip install -i https://bbpteam.epfl.ch/repository/devpi/simple/ "densities-validation>=0.1.1" + +# leaves-only +RUN pip install -i https://bbpteam.epfl.ch/repository/devpi/simple/ "cell-densities>=0.2.1" + +RUN git config --global --remove-section url."https://gitlab-ci-token:${CI_JOB_TOKEN}@bbpgitlab.epfl.ch/"