From 559268a5dae1b4f8c4e621db5c3b4913b85fd57d Mon Sep 17 00:00:00 2001 From: Robert Sachunsky Date: Fri, 2 Aug 2024 18:19:13 +0200 Subject: [PATCH 1/2] deps-cuda: download mamba matching actual CPU arch --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0608b0b738..dda48ce1d9 100644 --- a/Makefile +++ b/Makefile @@ -62,8 +62,9 @@ PIP_INSTALL_CONFIG_OPTION ?= deps-cuda: CONDA_EXE ?= /usr/local/bin/conda deps-cuda: export CONDA_PREFIX ?= /conda deps-cuda: PYTHON_PREFIX != $(PYTHON) -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])' +deps-cuda: ARCH != uname -p | sed 's/x86_64/64/' deps-cuda: - curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj bin/micromamba + curl -Ls https://micro.mamba.pm/api/micromamba/linux-$(ARCH)/latest | tar -xvj bin/micromamba mv bin/micromamba $(CONDA_EXE) # Install Conda system-wide (for interactive / login shells) echo 'export MAMBA_EXE=$(CONDA_EXE) MAMBA_ROOT_PREFIX=$(CONDA_PREFIX) CONDA_PREFIX=$(CONDA_PREFIX) PATH=$(CONDA_PREFIX)/bin:$$PATH' >> /etc/profile.d/98-conda.sh From 64663084895e04048454f7bd373c7b50e8c343fc Mon Sep 17 00:00:00 2001 From: Robert Sachunsky Date: Fri, 2 Aug 2024 18:20:00 +0200 Subject: [PATCH 2/2] GHA Docker: re-enable aarch64, workaround env issues --- .github/workflows/docker-image.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index da01c8cb20..ff331271d2 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -8,7 +8,9 @@ on: env: # FIXME: linux/arm/v7 disabled as long as scikit-build/cmake-python-distributions#503 is unresolved # PLATFORMS: linux/amd64,linux/arm/v7,linux/arm64/v8,linux/ppc64le - PLATFORMS: linux/amd64,linux/arm64/v8,linux/ppc64le + # FIXME: linux/ppc64le probably similar cause for "Installing build dependencies: still running..." + # PLATFORMS: linux/amd64,linux/arm64/v8,linux/ppc64le + PLATFORMS: linux/amd64,linux/arm64/v8 jobs: @@ -19,17 +21,19 @@ jobs: packages: write contents: read env: + # build both tags at once: DOCKER_BASE_TAG: ghcr.io/ocr-d docker.io/ocrd - # TODO(kba): make the interpolation work correctly - # DOCKER_BUILD: docker buildx build --progress=plain --platform ${{ env.PLATFORMS }} --push - # TODO(kba): Investigate why ppc64le build hangs on "Installing build dependencies" - # TODO(kba): Investigate why arm64 fails with .buildkit_qemu_emulator: /usr/local/bin/conda: Invalid ELF image for this architecture - DOCKER_BUILD: docker buildx build --progress=plain --platform linux/amd64 --push + # replace native build with buildx + DOCKER_BUILD_CMD: docker buildx build --progress=plain --push --platform steps: - name: Export variables run: | echo "DOCKER_BASE_TAG=${{ env.DOCKER_BASE_TAG }}" >> $GITHUB_ENV - echo "DOCKER_BUILD=${{ env.DOCKER_BUILD }}" >> $GITHUB_ENV + echo "DOCKER_BUILD=${{ env.DOCKER_BUILD_CMD }} ${{ env.PLATFORMS }}" >> $GITHUB_ENV + - name: Print variables + run: | + echo DOCKER_BASE_TAG=${DOCKER_BASE_TAG} + echo DOCKER_BUILD=${DOCKER_BUILD} - name: Checkout uses: actions/checkout@v4 with: