diff --git a/CHANGES.rst b/CHANGES.rst index e7ff38a5..57f15502 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,11 @@ Changes ======= +Version 0.9.2 (UNRELEASED) +-------------------------- + +- Fixes container image building on the arm64 architecture. + Version 0.9.1 (2023-09-27) -------------------------- diff --git a/Dockerfile b/Dockerfile index bfc2e4f3..338ab4f6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,9 @@ # Use Ubuntu LTS base image FROM docker.io/library/ubuntu:20.04 +# Recognise target architecture +ARG TARGETARCH + # Use default answers in installation commands ENV DEBIAN_FRONTEND=noninteractive @@ -44,8 +47,8 @@ RUN if echo "$COMPUTE_BACKENDS" | grep -q "htcondorcern"; then \ set -e; \ apt-get update -y; \ apt-get install --no-install-recommends -y wget alien gnupg2 rand; \ - wget -O ngbauth-submit.rpm https://linuxsoft.cern.ch/internal/repos/batch8s-stable/x86_64/os/Packages/n/ngbauth-submit-0.26-2.el8s.noarch.rpm; \ - wget -O myschedd.rpm https://linuxsoft.cern.ch/internal/repos/batch8s-stable/x86_64/os/Packages/m/myschedd-1.9-2.el8s.x86_64.rpm; \ + wget -q -O ngbauth-submit.rpm https://linuxsoft.cern.ch/internal/repos/batch8s-stable/x86_64/os/Packages/n/ngbauth-submit-0.26-2.el8s.noarch.rpm; \ + wget -q -O myschedd.rpm https://linuxsoft.cern.ch/internal/repos/batch8s-stable/x86_64/os/Packages/m/myschedd-1.9-2.el8s.x86_64.rpm; \ yes | alien -i myschedd.rpm; \ yes | alien -i ngbauth-submit.rpm; \ rm -rf myschedd.rpm ngbauth-submit.rpm; \ @@ -72,9 +75,9 @@ COPY etc/ngbauth-submit /etc/sysconfig/ COPY etc/ngauth_batch_crypt_pub.pem /etc/ COPY etc/cerngridca.crt /usr/local/share/ca-certificates/cerngridca.crt COPY etc/cernroot.crt /usr/local/share/ca-certificates/cernroot.crt -COPY etc/job_wrapper.sh etc/job_wrapper.sh -RUN chmod +x /etc/job_wrapper.sh -RUN update-ca-certificates +COPY etc/job_wrapper.sh /etc/job_wrapper.sh +RUN chmod +x /etc/job_wrapper.sh && \ + update-ca-certificates # Copy cluster component source code WORKDIR /code @@ -82,12 +85,25 @@ COPY . /code # Are we debugging? ARG DEBUG=0 -RUN if [ "${DEBUG}" -gt 0 ]; then pip install -e ".[debug]"; else pip install .; fi; +# hadolint ignore=DL3013,DL4006,SC1075 +RUN if [ "${DEBUG}" -gt 0 ]; then \ + if echo "$COMPUTE_BACKENDS" | grep -q "htcondorcern"; then \ + pip install --no-cache-dir -e ".[debug,htcondor]"; \ + else \ + pip install --no-cache-dir -e ".[debug]"; \ + fi \ + else \ + if echo "$COMPUTE_BACKENDS" | grep -q "htcondorcern"; then \ + pip install --no-cache-dir ".[htcondor]"; \ + else \ + pip install --no-cache-dir .; \ + fi \ + fi # Are we building with locally-checked-out shared modules? # hadolint ignore=SC2102 -RUN if test -e modules/reana-commons; then pip install -e modules/reana-commons[kubernetes] --upgrade; fi -RUN if test -e modules/reana-db; then pip install -e modules/reana-db --upgrade; fi +RUN if test -e modules/reana-commons; then pip install --no-cache-dir -e modules/reana-commons[kubernetes] --upgrade; fi +RUN if test -e modules/reana-db; then pip install --no-cache-dir -e modules/reana-db --upgrade; fi # Check for any broken Python dependencies RUN pip check diff --git a/requirements.txt b/requirements.txt index 8a66a763..ac7e64dd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -27,7 +27,6 @@ flask==2.1.3 # via reana-job-controller (setup.py) fs==2.4.16 # via reana-commons, reana-job-controller (setup.py) google-auth==2.23.0 # via kubernetes gssapi==1.8.3 # via paramiko -htcondor==9.0.17 # via reana-job-controller (setup.py) idna==3.4 # via jsonschema, requests importlib-metadata==6.8.0 # via alembic, flask importlib-resources==6.1.0 # via alembic diff --git a/run-tests.sh b/run-tests.sh index 7d2f0d7c..fb2aa6dd 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -98,7 +98,7 @@ check_pytest () { } check_dockerfile () { - docker run -i --rm docker.io/hadolint/hadolint:v1.18.2 < Dockerfile + docker run -i --rm docker.io/hadolint/hadolint:v2.12.0 < Dockerfile } check_docker_build () { diff --git a/setup.py b/setup.py index 7501d303..751bd350 100644 --- a/setup.py +++ b/setup.py @@ -35,6 +35,9 @@ "sphinxcontrib-openapi>=0.8.0", "sphinxcontrib-redoc>=1.5.1", ], + "htcondor": [ + "htcondor==9.0.17", + ], "tests": tests_require, "ssh": ["paramiko[gssapi]>=3.0.0"], } @@ -63,7 +66,6 @@ "marshmallow>2.13.0,<=2.20.1", "reana-commons[kubernetes]>=0.9.3,<0.10.0", "reana-db>=0.9.2,<0.10.0", - "htcondor==9.0.17", "retrying>=1.3.3", ]