Install db2 dependency on amd64 architectures (#17495)

This commit is contained in:
IceS2 2024-08-20 09:24:38 +02:00 committed by GitHub
parent 2722eadc33
commit 48b43900b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 23 additions and 26 deletions

View File

@ -53,7 +53,7 @@ RUN if [[ $(uname -m) == "arm64" || $(uname -m) == "aarch64" ]]; \
ENV LD_LIBRARY_PATH=/instantclient ENV LD_LIBRARY_PATH=/instantclient
# Install DB2 OAccess Driver # Install DB2 iAccess Driver
RUN if [[ $(uname -m) == "x86_64" ]]; \ RUN if [[ $(uname -m) == "x86_64" ]]; \
then \ then \
curl https://public.dhe.ibm.com/software/ibmi/products/odbc/debs/dists/1.1.0/ibmi-acs-1.1.0.list | tee /etc/apt/sources.list.d/ibmi-acs-1.1.0.list \ curl https://public.dhe.ibm.com/software/ibmi/products/odbc/debs/dists/1.1.0/ibmi-acs-1.1.0.list | tee /etc/apt/sources.list.d/ibmi-acs-1.1.0.list \
@ -82,10 +82,9 @@ RUN pip install "openmetadata-managed-apis~=${RI_VERSION}" --constraint "https:/
RUN pip install "openmetadata-ingestion[${INGESTION_DEPENDENCY}]~=${RI_VERSION}" RUN pip install "openmetadata-ingestion[${INGESTION_DEPENDENCY}]~=${RI_VERSION}"
# Temporary workaround for https://github.com/open-metadata/OpenMetadata/issues/9593 # Temporary workaround for https://github.com/open-metadata/OpenMetadata/issues/9593
RUN echo "Image built for $(uname -m)" RUN if [[ $(uname -m) == "x86_64" ]]; \
RUN if [[ $(uname -m) != "aarch64" ]]; \
then \ then \
pip install "ibm-db-sa~=0.4"; \ pip install "openmetadata-ingestion[db2]~=${RI_VERSION}"; \
fi fi
# bump python-daemon for https://github.com/apache/airflow/pull/29916 # bump python-daemon for https://github.com/apache/airflow/pull/29916

View File

@ -54,7 +54,7 @@ RUN if [[ $(uname -m) == "arm64" || $(uname -m) == "aarch64" ]]; \
ENV LD_LIBRARY_PATH=/instantclient ENV LD_LIBRARY_PATH=/instantclient
# Install DB2 OAccess Driver # Install DB2 iAccess Driver
RUN if [[ $(uname -m) == "x86_64" ]]; \ RUN if [[ $(uname -m) == "x86_64" ]]; \
then \ then \
curl https://public.dhe.ibm.com/software/ibmi/products/odbc/debs/dists/1.1.0/ibmi-acs-1.1.0.list | tee /etc/apt/sources.list.d/ibmi-acs-1.1.0.list \ curl https://public.dhe.ibm.com/software/ibmi/products/odbc/debs/dists/1.1.0/ibmi-acs-1.1.0.list | tee /etc/apt/sources.list.d/ibmi-acs-1.1.0.list \
@ -93,10 +93,9 @@ ARG INGESTION_DEPENDENCY="all"
RUN pip install ".[${INGESTION_DEPENDENCY}]" RUN pip install ".[${INGESTION_DEPENDENCY}]"
# Temporary workaround for https://github.com/open-metadata/OpenMetadata/issues/9593 # Temporary workaround for https://github.com/open-metadata/OpenMetadata/issues/9593
RUN echo "Image built for $(uname -m)" RUN if [[ $(uname -m) == "x86_64" ]]; \
RUN if [[ $(uname -m) != "aarch64" ]]; \
then \ then \
pip install "ibm-db-sa~=0.4"; \ pip install ".[db2]"; \
fi fi
# bump python-daemon for https://github.com/apache/airflow/pull/29916 # bump python-daemon for https://github.com/apache/airflow/pull/29916

View File

@ -59,7 +59,7 @@ RUN if [[ $(uname -m) == "arm64" || $(uname -m) == "aarch64" ]]; \
ENV LD_LIBRARY_PATH=/instantclient ENV LD_LIBRARY_PATH=/instantclient
# Install DB2 OAccess Driver # Install DB2 iAccess driver
RUN if [[ $(uname -m) == "x86_64" ]]; \ RUN if [[ $(uname -m) == "x86_64" ]]; \
then \ then \
curl https://public.dhe.ibm.com/software/ibmi/products/odbc/debs/dists/1.1.0/ibmi-acs-1.1.0.list | tee /etc/apt/sources.list.d/ibmi-acs-1.1.0.list \ curl https://public.dhe.ibm.com/software/ibmi/products/odbc/debs/dists/1.1.0/ibmi-acs-1.1.0.list | tee /etc/apt/sources.list.d/ibmi-acs-1.1.0.list \
@ -86,11 +86,11 @@ RUN pip install --upgrade pip
RUN pip install "openmetadata-ingestion[airflow]~=${RI_VERSION}" RUN pip install "openmetadata-ingestion[airflow]~=${RI_VERSION}"
RUN pip install "openmetadata-ingestion[${INGESTION_DEPENDENCY}]~=${RI_VERSION}" RUN pip install "openmetadata-ingestion[${INGESTION_DEPENDENCY}]~=${RI_VERSION}"
# Temporary workaround for https://github.com/open-metadata/OpenMetadata/issues/9593 # Temporary workaround for https://github.com/open-metadata/OpenMetadata/issues/9593
RUN echo "Image built for $(uname -m)" RUN if [[ $(uname -m) == "x86_64" ]]; \
RUN if [[ $(uname -m) == "arm64" ]]; \
then \ then \
pip install "ibm-db-sa~=0.4"; \ pip install "openmetadata-ingestion[db2]~=${RI_VERSION}"; \
fi fi
# Uninstalling psycopg2-binary and installing psycopg2 instead # Uninstalling psycopg2-binary and installing psycopg2 instead

View File

@ -59,7 +59,7 @@ RUN if [[ $(uname -m) == "arm64" || $(uname -m) == "aarch64" ]]; \
ENV LD_LIBRARY_PATH=/instantclient ENV LD_LIBRARY_PATH=/instantclient
# Install DB2 OAccess Driver # Install DB2 iAccess Driver
RUN if [[ $(uname -m) == "x86_64" ]]; \ RUN if [[ $(uname -m) == "x86_64" ]]; \
then \ then \
curl https://public.dhe.ibm.com/software/ibmi/products/odbc/debs/dists/1.1.0/ibmi-acs-1.1.0.list | tee /etc/apt/sources.list.d/ibmi-acs-1.1.0.list \ curl https://public.dhe.ibm.com/software/ibmi/products/odbc/debs/dists/1.1.0/ibmi-acs-1.1.0.list | tee /etc/apt/sources.list.d/ibmi-acs-1.1.0.list \
@ -84,16 +84,15 @@ ARG INGESTION_DEPENDENCY="all"
RUN pip install ".[airflow]" RUN pip install ".[airflow]"
RUN pip install ".[${INGESTION_DEPENDENCY}]" RUN pip install ".[${INGESTION_DEPENDENCY}]"
# Temporary workaround for https://github.com/open-metadata/OpenMetadata/issues/9593
RUN if [[ $(uname -m) == "x86_64" ]]; \
then \
pip install ".[db2]"; \
fi
# Required for Airflow DockerOperator, as we need to run the workflows from a `python main.py` command in the container. # Required for Airflow DockerOperator, as we need to run the workflows from a `python main.py` command in the container.
COPY ingestion/operators/docker/*.py . COPY ingestion/operators/docker/*.py .
# Temporary workaround for https://github.com/open-metadata/OpenMetadata/issues/9593
RUN echo "Image built for $(uname -m)"
RUN if [[ $(uname -m) == "arm64" ]]; \
then \
pip install "ibm-db-sa~=0.4"; \
fi
# Uninstalling psycopg2-binary and installing psycopg2 instead # Uninstalling psycopg2-binary and installing psycopg2 instead
# because the psycopg2-binary generates a architecture specific error # because the psycopg2-binary generates a architecture specific error
# while authenticating connection with the airflow, psycopg2 solves this error # while authenticating connection with the airflow, psycopg2 solves this error