From: garciadeblas Date: Mon, 28 Nov 2022 22:54:26 +0000 (+0100) Subject: Update Airflow/Dockerfile to install osm_ngsa deb package in user folder X-Git-Tag: release-v14.0-start~130 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F45%2F12745%2F2;p=osm%2Fdevops.git Update Airflow/Dockerfile to install osm_ngsa deb package in user folder Change-Id: Iacc57c09341252ca7d7a11f89a2ba7a3ba697cf9 Signed-off-by: garciadeblas --- diff --git a/docker/Airflow/Dockerfile b/docker/Airflow/Dockerfile index 73591cda..2727977f 100644 --- a/docker/Airflow/Dockerfile +++ b/docker/Airflow/Dockerfile @@ -23,15 +23,24 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get --yes update && \ python3-setuptools wget && \ python3 -m pip install -U pip build +USER airflow + ARG PYTHON3_OSM_COMMON_URL ARG PYTHON3_OSM_NGSA_URL RUN curl $PYTHON3_OSM_COMMON_URL -o osm_common.deb -RUN dpkg -i ./osm_common.deb RUN curl $PYTHON3_OSM_NGSA_URL -o osm_ngsa.deb -RUN dpkg -i ./osm_ngsa.deb +RUN mkdir /tmp/osm +RUN dpkg-deb -x osm_common.deb /tmp/osm +RUN dpkg-deb -x osm_ngsa.deb /tmp/osm + +RUN mv /tmp/osm/usr/lib/python3/dist-packages/* /home/airflow/.local/lib/python3.8/site-packages/ +RUN rm -rf /tmp/osm RUN pip3 install \ - -r /usr/lib/python3/dist-packages/osm_common/requirements.txt \ - -r /usr/lib/python3/dist-packages/osm_ngsa/requirements.txt + -r /home/airflow/.local/lib/python3.8/site-packages/osm_common/requirements.txt \ + -r /home/airflow/.local/lib/python3.8/site-packages/osm_ngsa/requirements.txt + +RUN pip3 install \ + -r /home/airflow/.local/lib/python3.8/site-packages/osm_common/requirements.txt \ + -r /home/airflow/.local/lib/python3.8/site-packages/osm_ngsa/requirements.txt -USER airflow diff --git a/installers/helm/values/airflow-values.yaml b/installers/helm/values/airflow-values.yaml index fd7eb634..0a62abfe 100644 --- a/installers/helm/values/airflow-values.yaml +++ b/installers/helm/values/airflow-values.yaml @@ -30,5 +30,5 @@ extraEnvFrom: | name: ngsa-secret config: core: - dags_folder: "/usr/lib/python3/dist-packages/osm_ngsa" + dags_folder: "/home/airflow/.local/lib/python3.8/site-packages/osm_ngsa"