diff --git a/.github/workflows/dev-build.yml b/.github/workflows/dev-build.yml index b60e876..95b49c8 100644 --- a/.github/workflows/dev-build.yml +++ b/.github/workflows/dev-build.yml @@ -37,6 +37,10 @@ jobs: - name: Check out the repo uses: actions/checkout@v4 + # Enable multi-architecture builds via QEMU emulation + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + # Enable advanced Docker build features (required for caching) - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -64,6 +68,7 @@ jobs: context: . file: ./Dockerfile push: true + platforms: linux/amd64,linux/arm64 build-args: RELEASE_VERSION=${{ env.RELEASE_TAG }} tags: ${{ env.REPOSITORY_NAMESPACE }}/${{ env.NMRKIT_REPOSITORY_NAME }}:${{ env.RELEASE_TAG }} cache-from: type=registry,ref=${{ env.REPOSITORY_NAMESPACE }}/${{ env.NMRKIT_REPOSITORY_NAME }}:buildcache diff --git a/.github/workflows/prod-build.yml b/.github/workflows/prod-build.yml index 62fb832..aaa1b62 100644 --- a/.github/workflows/prod-build.yml +++ b/.github/workflows/prod-build.yml @@ -73,6 +73,10 @@ jobs: - name: Check out the repo uses: actions/checkout@v4 + # Enable multi-architecture builds via QEMU emulation + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + # Enable advanced Docker build features (required for caching) - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -100,6 +104,7 @@ jobs: context: . file: ./Dockerfile push: true + platforms: linux/amd64,linux/arm64 build-args: RELEASE_VERSION=${{ env.RELEASE_TAG }} tags: ${{ env.REPOSITORY_NAMESPACE }}/${{ env.NMRKIT_REPOSITORY_NAME }}:${{ env.RELEASE_TAG }} cache-from: type=registry,ref=${{ env.REPOSITORY_NAMESPACE }}/${{ env.NMRKIT_REPOSITORY_NAME }}:buildcache diff --git a/Dockerfile b/Dockerfile index 79f3b16..8d747a5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ FROM continuumio/miniconda3:24.1.2-0 AS nmrkit-ms +ARG TARGETARCH ENV PYTHON_VERSION=3.10 ENV OPENBABEL_VERSION=v3.1 @@ -30,7 +31,7 @@ RUN pip3 install rdkit RUN python3 -m pip install -U pip -ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64/ +ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-${TARGETARCH}/ RUN export JAVA_HOME RUN git clone "https://github.com/rinikerlab/lightweight-registration.git" lwreg