Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish Dockerfile in docker hub #4

Merged
merged 42 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
89f11a7
Publish Dockerfile
lecriste Nov 25, 2024
062394b
Add double quotes for tags field
lecriste Nov 25, 2024
01304cc
Use context
lecriste Nov 25, 2024
76717dc
Update action name
lecriste Nov 25, 2024
26852ec
Reduce context to var only
lecriste Nov 25, 2024
ba2a257
Use context in definition of REGISTRY_IMAGE_TAG
lecriste Nov 25, 2024
92a1853
Both vars in context
lecriste Nov 25, 2024
2a68bc7
Try escape
lecriste Nov 25, 2024
61a7bde
Two contexts
lecriste Nov 25, 2024
23831a7
One context
lecriste Nov 25, 2024
51b4bf3
Add debug step
lecriste Nov 25, 2024
e57a875
Fix REGISTRY_IMAGE_TAG
lecriste Nov 25, 2024
61ebd60
Try github.
lecriste Nov 25, 2024
240eb84
Add vars
lecriste Nov 25, 2024
10f80fd
__
lecriste Nov 25, 2024
907a05c
CI_REGISTRY_IMAGE
lecriste Nov 25, 2024
0ee8e4a
no vars
lecriste Nov 25, 2024
7afb6e0
try env
lecriste Nov 25, 2024
7b34458
.github
lecriste Nov 25, 2024
3f45bcd
github. without context
lecriste Nov 25, 2024
df1b31f
final
lecriste Nov 25, 2024
a3c5c30
forgotten $
lecriste Nov 25, 2024
731bd75
RUN ls
lecriste Nov 25, 2024
afe2c6d
pip install .
lecriste Nov 25, 2024
06a97f0
keep order in Dockerfile
lecriste Nov 25, 2024
ad2c218
install requirements
lecriste Nov 25, 2024
2a054f9
github.com/BlueBrain/[email protected]
lecriste Nov 25, 2024
80126c4
RUN pwd and ls
lecriste Nov 26, 2024
f4e2476
ls -a
lecriste Nov 26, 2024
32fdfe9
v4
lecriste Nov 26, 2024
bd94a0f
fetch-depth
lecriste Nov 26, 2024
edeb998
git clone
lecriste Nov 26, 2024
65962ba
pip install git+
lecriste Nov 26, 2024
676dccd
missing @
lecriste Nov 26, 2024
93794ff
Ypdate .gitlab
lecriste Nov 26, 2024
e93ceef
Test deply without densities-validation
lecriste Nov 26, 2024
47977ff
Drop version from leaves-only
lecriste Nov 26, 2024
77d9ced
Temporary fix waiting for PyPi cell-densities-validations
lecriste Nov 26, 2024
ff857f3
Use tag for cell-density-validation
lecriste Dec 3, 2024
2ae1d19
Switch to molsys-cell-atlas repo
lecriste Dec 10, 2024
e28f46f
Enable full actions
lecriste Dec 10, 2024
1a29691
Expand pip install git+https://github.com/BlueBrain/cell-density-vali…
lecriste Dec 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions .github/workflows/on_tag.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish sdist tarball to PyPi
name: Publish sdist tarball to PyPi and docker image to docker hub

on:
push:
Expand All @@ -15,7 +15,7 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Build a source tarball
- name: Install build
run: |
python -m pip install --upgrade pip
python -m pip install build
Expand All @@ -27,3 +27,26 @@ jobs:
with:
password: ${{ secrets.PYPI_API_TOKEN }}
verbose: true

deploy_docker_image:
env:
CI_REGISTRY_IMAGE: bluebrain/bbp-atlas-pipeline
REGISTRY_IMAGE_TAG: ${{ github.ref_name }}
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- 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: ${{ env.CI_REGISTRY_IMAGE }}:${{ env.REGISTRY_IMAGE_TAG }}
build-args: |
REF_NAME=${{ env.REGISTRY_IMAGE_TAG }}
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ update-pipeline-image:
allow_failure: true
variables:
BUILD_PATH: $CI_PROJECT_DIR
KANIKO_EXTRA_ARGS: "--build-arg CI_JOB_TOKEN=$CI_JOB_TOKEN --build-arg BBP_CA_CERT='$BBP_CA_CERT'"
KANIKO_EXTRA_ARGS: "--build-arg REF_NAME=$REGISTRY_IMAGE_TAG"
KUBERNETES_MEMORY_LIMIT: 4Gi
KUBERNETES_MEMORY_REQUEST: 4Gi
before_script:
Expand Down
30 changes: 11 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
FROM python:3.10-slim

ARG CI_JOB_TOKEN
ARG BBP_CA_CERT
ARG REF_NAME=main # Default to 'main' if REF_NAME is not passed

RUN apt-get update && \
DEBIAN_FRONTEND="noninteractive" TZ="Europe/Zurich" apt-get install -y tzdata && \
Expand All @@ -27,39 +26,32 @@ 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 git+https://github.com/BlueBrain/bbp-atlas-pipeline.git@${REF_NAME}

# 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"
RUN pip install git+https://github.com/BlueBrain/bbp-atlas-data-fetch.git@v0.3.0

# densities validation
RUN pip install -i https://bbpteam.epfl.ch/repository/devpi/simple/ "densities-validation>=0.1.1"
RUN pip install git+https://github.com/BlueBrain/[email protected]

# leaves-only
RUN pip install -i https://bbpteam.epfl.ch/repository/devpi/simple/ "cell-densities>=0.2.1"
RUN git clone --branch v0.2.1 https://github.com/BlueBrain/cell-density-validations.git cell-density-validation
RUN pip install cell-density-validation/cell-densities/

# 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/[email protected]

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 git+https://bbpgitlab.epfl.ch/dke/users/jonathanlurie/[email protected]

RUN pip install -i https://bbpteam.epfl.ch/repository/devpi/simple/ "pipeline-validator>=0.3.1"
RUN pip install "blue-brain-data-push>=4.3.0"

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"

Expand Down
Loading