Skip to content

Commit

Permalink
Install QEMU emulator in arm64 variant of cpubuilder image. (#13)
Browse files Browse the repository at this point in the history
Follow-up to #11.

This emulator was originally installed in
iree-org/iree#16331. We've been carrying it
around since then.

I'm not thrilled with the file sitting in a cloud storage bucket (GCS or
Azure). The file is 5MB so maybe we could check it in here via git LFS?
Or we could build it from source via our automation.
  • Loading branch information
ScottTodd authored Sep 20, 2024
1 parent a61eb38 commit cff8945
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 0 deletions.
10 changes: 10 additions & 0 deletions build_tools/install_arch_extras_amd64.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
# Copyright 2024 The IREE Authors
#
# Licensed under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

set -euo pipefail

# No extras :D
13 changes: 13 additions & 0 deletions build_tools/install_arch_extras_arm64.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
# Copyright 2024 The IREE Authors
#
# Licensed under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

set -euo pipefail

# QEMU for aarch64
wget --no-verbose "https://sharkpublic.blob.core.windows.net/sharkpublic/GCP-Migration-Files/qemu-aarch64"
chmod +x ./qemu-aarch64
mv ./qemu-aarch64 /usr/bin/qemu-aarch64
5 changes: 5 additions & 0 deletions dockerfiles/cpubuilder_ubuntu_jammy.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,9 @@ WORKDIR /install-sccache
COPY build_tools/install_sccache.sh ./
RUN ./install_sccache.sh "0.8.1" && rm -rf /install-sccache

######## target-architecture-specific installs ########
WORKDIR /install-target-arch
COPY build_tools/install_arch_extras_${TARGETARCH}.sh ./
RUN ./install_arch_extras_${TARGETARCH}.sh && rm -rf /install-target-arch

WORKDIR /
5 changes: 5 additions & 0 deletions dockerfiles/cpubuilder_ubuntu_jammy_ghr.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,10 @@ WORKDIR /install-sccache
COPY build_tools/install_sccache.sh ./
RUN ./install_sccache.sh "0.8.1" && rm -rf /install-sccache

######## target-architecture-specific installs ########
WORKDIR /install-target-arch
COPY build_tools/install_arch_extras_${TARGETARCH}.sh ./
RUN ./install_arch_extras_${TARGETARCH}.sh && rm -rf /install-target-arch

# Switch back to the working directory upstream expects.
WORKDIR /actions-runner

0 comments on commit cff8945

Please sign in to comment.