Skip to content
Snippets Groups Projects
Commit 745af3bb authored by Luc Hermitte's avatar Luc Hermitte
Browse files

Merge branch 'auto-activate' into 'master'

ENH: Automatically activate virtual env

See merge request !5
parents d1f0f17b 6525ba79
No related branches found
No related tags found
1 merge request!5ENH: Automatically activate virtual env
Pipeline #14295 passed
variables:
S1TD_VERSIONVERSION: "1.3.1" # S1Tiling Dockers version
S1TD_VERSION: "1.3.2" # S1Tiling Dockers version
OTB7_VERSION: "7.4.1"
OTB8_VERSION: "8.1.2"
......@@ -23,7 +23,7 @@ stages:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
variables:
FULL_VERSION: "${S1TD_VERSIONVERSION}-${OS}${OS_VERSION}-otb${OTB_VERSION}"
FULL_VERSION: "${S1TD_VERSION}-${OS}${OS_VERSION}-otb${OTB_VERSION}"
before_script:
- *prepare-docker-config
script:
......@@ -34,11 +34,10 @@ stages:
--context "${CI_PROJECT_DIR}/"
--dockerfile "${CI_PROJECT_DIR}/${OS}/${STEP}/Dockerfile"
--destination "${CI_REGISTRY_IMAGE}/s1tiling-${STEP}:${FULL_VERSION}"
--build-arg REPOSITORY
--build-arg CI_COMMIT_SHA
--build-arg OTB_VERSION
--build-arg OTB_INSTALLER
--build-arg S1TD_VERSIONVERSION
--build-arg S1TD_VERSION
--build-arg FULL_VERSION
--build-arg OS_VERSION
--build-arg PYTHON_VERSION
......
......@@ -35,15 +35,15 @@ ARG OTB_ORIG=https://www.orfeo-toolbox.org/packages/archives/OTB
ARG OTB_INSTALLER
ARG CREATION_DATE
LABEL org.opencontainers.image.authors="CS Group, CNES"
LABEL org.opencontainers.image.base.name="${REPOSITORY}/s1tiling-base:${FULL_VERSION}"
LABEL org.opencontainers.image.authors="CS Group France, CNES"
LABEL org.opencontainers.image.base.name="ubuntu:${OS_VERSION}"
LABEL org.opencontainers.image.created="${CREATION_DATE}"
LABEL org.opencontainers.image.description="Base docker providing the dependencies of S1Tiling processing chain."
LABEL org.opencontainers.image.licences="Apache-2.0"
LABEL org.opencontainers.image.revision="$CI_COMMIT_SHA"
LABEL org.opencontainers.image.source="https://gitlab.orfeo-toolbox.org/s1-tiling/s1tiling-dockers"
LABEL org.opencontainers.image.title="S1Tiling base dependencies"
LABEL org.opencontainers.image.url="https://gitlab.orfeo-toolbox.org/s1-tiling/s1tiling-dockers/-/blob/main/Dockerfile"
LABEL org.opencontainers.image.url="https://gitlab.orfeo-toolbox.org/s1-tiling/s1tiling-dockers/-/blob/master/ubuntu/base/Dockerfile"
LABEL org.opencontainers.image.vendor="CNES"
LABEL org.opencontainers.image.version="${FULL_VERSION}"
......@@ -145,13 +145,21 @@ RUN uname -a \
# && apt-get install -y --no-install-recommends -f python3 \
# Persistant env ; replaces sourcing otbenv.profile
## Persistant env
# - replaces sourcing otbenv.profile
ENV CMAKE_PREFIX_PATH="${OTB_INSTALL_DIRNAME}"
ENV PYTHONPATH="${OTB_INSTALL_DIRNAME}/lib/python"
ENV GDAL_DRIVER_PATH=disable
ENV GDAL_DATA="${OTB_INSTALL_DIRNAME}/share/gdal"
ENV PROJ_LIB="${OTB_INSTALL_DIRNAME}/share/proj"
ENV PATH="${OTB_INSTALL_DIRNAME}/bin:$PATH"
ENV PATH="${S1TILING_VENV}/bin:${OTB_INSTALL_DIRNAME}/bin:$PATH"
ENV OTB_APPLICATION_PATH="${OTB_INSTALL_DIRNAME}/lib/otb/applications"
ENV LD_LIBRARY_PATH="${OTB_INSTALL_DIRNAME}/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
ENV LC_NUMERIC=C
# - replaces activating virtual environment
ENV VIRTUAL_ENV="${S1TILING_VENV}"
ENV VIRTUAL_ENV_PROMPT="(Docker S1Tiling) "
ENV PS1="${VIRTUAL_ENV_PROMPT} ${PS1}"
# PATH has already been updated
......@@ -30,15 +30,15 @@ ARG FULL_VERSION
FROM ${REPOSITORY}/s1tiling-base:${FULL_VERSION}
ARG CREATION_DATE
LABEL org.opencontainers.image.authors="CS Group, CNES"
LABEL org.opencontainers.image.base.name="${REPOSITORY}/s1tiling-dev:${FULL_VERSION}"
LABEL org.opencontainers.image.authors="CS Group France, CNES"
LABEL org.opencontainers.image.base.name="${REPOSITORY}/s1tiling-base:${FULL_VERSION}"
LABEL org.opencontainers.image.created="${CREATION_DATE}"
LABEL org.opencontainers.image.description="Internal docker dedicated to the automation of S1Tiling tests"
LABEL org.opencontainers.image.licences="Apache-2.0"
LABEL org.opencontainers.image.revision="$CI_COMMIT_SHA"
LABEL org.opencontainers.image.source="https://gitlab.orfeo-toolbox.org/s1-tiling/s1tiling-dockers"
LABEL org.opencontainers.image.title="S1Tiling base dependencies"
LABEL org.opencontainers.image.url="https://gitlab.orfeo-toolbox.org/s1-tiling/s1tiling-dockers/-/blob/main/Dockerfile"
LABEL org.opencontainers.image.url="https://gitlab.orfeo-toolbox.org/s1-tiling/s1tiling-dockers/-/blob/master/ubuntu/dev/Dockerfile"
LABEL org.opencontainers.image.vendor="CNES"
LABEL org.opencontainers.image.version="${FULL_VERSION}"
......@@ -48,7 +48,6 @@ RUN \
apt-get update -y \
&& apt-get upgrade -y \
&& apt-get install -y --no-install-recommends rclone graphviz \
&& . "${S1TILING_VENV}/bin/activate" \
&& python3 -m pip --no-cache-dir install \
"sphinx == 1.8.0" \
"natsort" \
......
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