Skip to content
Snippets Groups Projects
Commit 346707c5 authored by POLLET Vincent's avatar POLLET Vincent
Browse files

Use debian slim micromamba image, because alpine images crash apptainer on alma9 hosts

parent 21bd1ff2
No related branches found
No related tags found
No related merge requests found
Pipeline #368587 passed
...@@ -44,7 +44,15 @@ variables: ...@@ -44,7 +44,15 @@ variables:
- docker/* - docker/*
- docker/**/* - docker/**/*
- if: $CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web" # images are rebuild for scheduled or manually triggered pipelines - if: $CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web" # images are rebuild for scheduled or manually triggered pipelines
# kaniko needs some configuration, which is the same for all container building jobs
.kaniko_write_config:
before_script:
- uname -a
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"${CI_REGISTRY}\":{\"auth\":\"$(printf "%s:%s" "${CI_REGISTRY_USER}" "${CI_REGISTRY_PASSWORD}" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
# We use another stage to produce the pinned dependencies files instead of using a multistage # We use another stage to produce the pinned dependencies files instead of using a multistage
# dockerfile to build a base image because # dockerfile to build a base image because
...@@ -54,9 +62,10 @@ variables: ...@@ -54,9 +62,10 @@ variables:
# (not sure about 2, but somehow dependencies are found yet missing if test build follows dev in same stage) # (not sure about 2, but somehow dependencies are found yet missing if test build follows dev in same stage)
generate_pinned_env_files: generate_pinned_env_files:
stage: GeneratePinnedEnvFiles stage: GeneratePinnedEnvFiles
extends: .build_dev_test_base_images extends:
- .build_dev_test_base_images
image: image:
name: mambaorg/micromamba:alpine name: mambaorg/micromamba:debian-slim
script: script:
- uname -a - uname -a
- eval "$(micromamba shell hook --shell bash)" - eval "$(micromamba shell hook --shell bash)"
...@@ -82,14 +91,13 @@ generate_pinned_env_files: ...@@ -82,14 +91,13 @@ generate_pinned_env_files:
build_docker_dev_image: build_docker_dev_image:
stage: DockerBuildDevTestBaseImages stage: DockerBuildDevTestBaseImages
extends: .build_dev_test_base_images extends:
- .build_dev_test_base_images
- .kaniko_write_config
image: image:
name: gcr.io/kaniko-project/executor:debug name: gcr.io/kaniko-project/executor:debug
entrypoint: [""] # overwrite image entrypoint entrypoint: [""] # overwrite image entrypoint
script: script:
- uname -a
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"${CI_REGISTRY}\":{\"auth\":\"$(printf "%s:%s" "${CI_REGISTRY_USER}" "${CI_REGISTRY_PASSWORD}" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
- >- - >-
/kaniko/executor /kaniko/executor
--context "${CI_PROJECT_DIR}" --context "${CI_PROJECT_DIR}"
...@@ -100,14 +108,13 @@ build_docker_dev_image: ...@@ -100,14 +108,13 @@ build_docker_dev_image:
build_docker_test_images: build_docker_test_images:
stage: DockerBuildDevTestBaseImages stage: DockerBuildDevTestBaseImages
extends: .build_dev_test_base_images extends:
- .build_dev_test_base_images
- .kaniko_write_config
image: image:
name: gcr.io/kaniko-project/executor:debug name: gcr.io/kaniko-project/executor:debug
entrypoint: [""] # overwrite image entrypoint entrypoint: [""] # overwrite image entrypoint
script: script:
- uname -a
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"${CI_REGISTRY}\":{\"auth\":\"$(printf "%s:%s" "${CI_REGISTRY_USER}" "${CI_REGISTRY_PASSWORD}" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
- >- - >-
/kaniko/executor /kaniko/executor
--context "${CI_PROJECT_DIR}" --context "${CI_PROJECT_DIR}"
...@@ -118,14 +125,13 @@ build_docker_test_images: ...@@ -118,14 +125,13 @@ build_docker_test_images:
build_docker_base_images: build_docker_base_images:
stage: DockerBuildDevTestBaseImages stage: DockerBuildDevTestBaseImages
extends: .build_dev_test_base_images extends:
- .build_dev_test_base_images
- .kaniko_write_config
image: image:
name: gcr.io/kaniko-project/executor:debug name: gcr.io/kaniko-project/executor:debug
entrypoint: [""] # overwrite image entrypoint entrypoint: [""] # overwrite image entrypoint
script: script:
- uname -a
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"${CI_REGISTRY}\":{\"auth\":\"$(printf "%s:%s" "${CI_REGISTRY_USER}" "${CI_REGISTRY_PASSWORD}" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
- >- - >-
/kaniko/executor /kaniko/executor
--context "${CI_PROJECT_DIR}" --context "${CI_PROJECT_DIR}"
...@@ -167,6 +173,7 @@ unit_test: ...@@ -167,6 +173,7 @@ unit_test:
- pytest - pytest
tests/ tests/
--cov=rta_reconstruction --cov=rta_reconstruction
--cov-branch
--cov-report html:htmlcov --cov-report html:htmlcov
--cov-report xml:coverage.xml --cov-report xml:coverage.xml
--cov-report term-missing:skip-covered --cov-report term-missing:skip-covered
...@@ -248,13 +255,12 @@ build_docker_image_latest: ...@@ -248,13 +255,12 @@ build_docker_image_latest:
BUILD_DESTINATION: ${DEFAULT_BRANCH_PROD_IMAGE_PERMANENT_LOCATION} BUILD_DESTINATION: ${DEFAULT_BRANCH_PROD_IMAGE_PERMANENT_LOCATION}
BASE_IMAGE_LOCATION: "${DEFAULT_BRANCH_BASE_IMAGE_PERMANENT_LOCATION}" BASE_IMAGE_LOCATION: "${DEFAULT_BRANCH_BASE_IMAGE_PERMANENT_LOCATION}"
- if: $CI_PIPELINE_SOURCE != "merge_request_event" # Run in all other cases, avoiding merge request pipelines - if: $CI_PIPELINE_SOURCE != "merge_request_event" # Run in all other cases, avoiding merge request pipelines
extends:
- .kaniko_write_config
image: image:
name: gcr.io/kaniko-project/executor:debug name: gcr.io/kaniko-project/executor:debug
entrypoint: [""] # overwrite image entrypoint entrypoint: [""] # overwrite image entrypoint
script: script:
- uname -a
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"${CI_REGISTRY}\":{\"auth\":\"$(printf "%s:%s" "${CI_REGISTRY_USER}" "${CI_REGISTRY_PASSWORD}" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
- >- - >-
/kaniko/executor /kaniko/executor
--context "${CI_PROJECT_DIR}" --context "${CI_PROJECT_DIR}"
......
FROM mambaorg/micromamba:alpine FROM mambaorg/micromamba:debian-slim
# micromamba dockerfile makes use of SHELL. If it is overwritten # micromamba dockerfile makes use of SHELL. If it is overwritten
# the auto-activate might not work # the auto-activate might not work
...@@ -10,7 +10,7 @@ FROM mambaorg/micromamba:alpine ...@@ -10,7 +10,7 @@ FROM mambaorg/micromamba:alpine
# We need git for setuptools scm to automatically detect version # We need git for setuptools scm to automatically detect version
USER root USER root
RUN apk update && apk upgrade --no-cache && apk add git git-lfs RUN apt update && apt upgrade -y && apt install -y git git-lfs && apt clean && apt autoremove
USER $MAMBA_USER USER $MAMBA_USER
# Copy the pinned dependencies file. It is generated in the first CI stage and made an artifact # Copy the pinned dependencies file. It is generated in the first CI stage and made an artifact
......
FROM mambaorg/micromamba:alpine FROM mambaorg/micromamba:debian-slim
# micromamba dockerfile makes use of SHELL. If it is overwritten # micromamba dockerfile makes use of SHELL. If it is overwritten
# the auto-activate might not work # the auto-activate might not work
...@@ -10,7 +10,7 @@ FROM mambaorg/micromamba:alpine ...@@ -10,7 +10,7 @@ FROM mambaorg/micromamba:alpine
# We need git for setuptools scm to automatically detect version # We need git for setuptools scm to automatically detect version
USER root USER root
RUN apk update && apk upgrade --no-cache && apk add git git-lfs RUN apt update && apt upgrade -y && apt install -y git git-lfs && apt clean && apt autoremove
# We need to change the permissions on /opt/conda so that other users will be able to modify the environment # We need to change the permissions on /opt/conda so that other users will be able to modify the environment
# this is required to let the developers entering the container with their own "uid" to be able to install/modify # this is required to let the developers entering the container with their own "uid" to be able to install/modify
# dependencies. # dependencies.
......
FROM mambaorg/micromamba:alpine FROM mambaorg/micromamba:debian-slim
# micromamba dockerfile makes use of SHELL. If it is overwritten # micromamba dockerfile makes use of SHELL. If it is overwritten
# the auto-activate might not work # the auto-activate might not work
...@@ -10,7 +10,7 @@ FROM mambaorg/micromamba:alpine ...@@ -10,7 +10,7 @@ FROM mambaorg/micromamba:alpine
# We need git for setuptools scm to automatically detect version # We need git for setuptools scm to automatically detect version
USER root USER root
RUN apk update && apk upgrade --no-cache && apk add git git-lfs RUN apt update && apt upgrade -y && apt install -y git git-lfs && apt clean && apt autoremove
# We need to change the permissions on /opt/conda so that other users will be able to modify the environment # We need to change the permissions on /opt/conda so that other users will be able to modify the environment
# this is required to let the developers entering the container with their own "uid" to be able to install/modify # this is required to let the developers entering the container with their own "uid" to be able to install/modify
# dependencies. # dependencies.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment