diff --git a/.github/workflows/dev-build.yml b/.github/workflows/dev-build.yml index b60e876..583a0f5 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 @@ -77,6 +82,7 @@ jobs: context: ./app/scripts/nmr-cli/ file: ./app/scripts/nmr-cli/Dockerfile push: true + platforms: linux/amd64,linux/arm64 build-args: RELEASE_VERSION=${{ env.RELEASE_TAG }} tags: ${{ env.REPOSITORY_NAMESPACE }}/${{ env.NMR_CLI_REPOSITORY_NAME }}:${{ env.RELEASE_TAG }} cache-from: type=registry,ref=${{ env.REPOSITORY_NAMESPACE }}/${{ env.NMR_CLI_REPOSITORY_NAME }}:buildcache diff --git a/.github/workflows/prod-build.yml b/.github/workflows/prod-build.yml index 13c6ed8..1cfdcc2 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 @@ -108,6 +112,7 @@ jobs: context: . file: ./Dockerfile push: true + platforms: linux/amd64,linux/arm64 build-args: RELEASE_VERSION=${{ steps.release_version.outputs.release }} tags: | ${{ env.REPOSITORY_NAMESPACE }}/${{ env.NMRKIT_REPOSITORY_NAME }}:${{ env.RELEASE_TAG }} @@ -123,6 +128,7 @@ jobs: context: ./app/scripts/nmr-cli/ file: ./app/scripts/nmr-cli/Dockerfile push: true + platforms: linux/amd64,linux/arm64 build-args: RELEASE_VERSION=${{ steps.release_version.outputs.release }} tags: | ${{ env.REPOSITORY_NAMESPACE }}/${{ env.NMR_CLI_REPOSITORY_NAME }}:${{ env.RELEASE_TAG }} diff --git a/Dockerfile b/Dockerfile index 79f3b16..e9f73d1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ FROM continuumio/miniconda3:24.1.2-0 AS nmrkit-ms +ARG TARGETARCH=amd64 ENV PYTHON_VERSION=3.10 ENV OPENBABEL_VERSION=v3.1 @@ -30,8 +31,7 @@ RUN pip3 install rdkit RUN python3 -m pip install -U pip -ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64/ -RUN export JAVA_HOME +ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-${TARGETARCH}/ RUN git clone "https://github.com/rinikerlab/lightweight-registration.git" lwreg RUN chmod +x lwreg