From 0b252d16506861bcf7fa305e05a139f63f20d4df Mon Sep 17 00:00:00 2001 From: Alex Reinking Date: Tue, 27 Aug 2024 12:18:08 -0400 Subject: [PATCH] update docker images --- .github/workflows/build.yml | 11 +++---- Dockerfile | 59 +++++++++++++++++++++++++------------ README.md | 6 ++-- build-images.sh | 2 +- 4 files changed, 50 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0f014bf..a50049b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,28 +25,29 @@ jobs: matrix: arch: [ x86_64, - aarch64 + aarch64, ] version: [ 17.0.6, + 18.1.8, ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Log in to GitHub Container Registry - uses: docker/login-action@v3.0.0 + uses: docker/login-action@v3.3.0 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Set up QEMU - uses: docker/setup-qemu-action@v3 + uses: docker/setup-qemu-action@v3.2.0 with: platforms: "arm64" - name: Build and push image - uses: docker/build-push-action@v5.1.0 + uses: docker/build-push-action@v6.7.0 with: context: . push: true diff --git a/Dockerfile b/Dockerfile index 09d6157..1131769 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,28 +3,50 @@ FROM quay.io/pypa/manylinux2014_$ARCH WORKDIR /ws +## Install wget +RUN yum -y install wget + ## Install Ninja -RUN \ - git clone --depth 1 --branch v1.11.1 https://github.com/ninja-build/ninja.git && \ - cmake -S ninja -B build -DCMAKE_BUILD_TYPE=Release && \ +RUN git clone --depth 1 --branch v1.12.1 https://github.com/ninja-build/ninja.git && \ + cmake -S ninja -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF && \ cmake --build build --target install -j "$(nproc)" && \ rm -rf ninja build -## Install ZLIB -ARG ZLIB_TAG=v1.3 -RUN git clone --depth 1 --branch "$ZLIB_TAG" https://github.com/madler/zlib.git && \ - cmake -G Ninja -S zlib -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_POSITION_INDEPENDENT_CODE=ON && \ +## Install flatbuffers +ARG FB_VERSION=23.5.26 +RUN wget -q https://github.com/google/flatbuffers/archive/refs/tags/v${FB_VERSION}.tar.gz && \ + tar xvf v${FB_VERSION}.tar.gz && \ + rm v${FB_VERSION}.tar.gz && \ + cmake -G Ninja -S flatbuffers-${FB_VERSION} -B build \ + -DCMAKE_BUILD_TYPE=Release \ + -DFLATBUFFERS_BUILD_TESTS=OFF \ + && \ + cmake --build build --target install && \ + rm -rf flatbuffers-${FB_VERSION} build + +## Install flatbuffers +ARG WABT_VERSION=1.0.36 +RUN git clone --recursive --depth 1 --branch ${WABT_VERSION} https://github.com/WebAssembly/wabt.git && \ + cmake -G Ninja -S wabt -B build \ + -DCMAKE_BUILD_TYPE=Release \ + -DWITH_EXCEPTIONS=ON \ + -DBUILD_TESTS=OFF \ + -DBUILD_TOOLS=OFF \ + -DBUILD_LIBWASM=OFF \ + -DUSE_INTERNAL_SHA256=ON \ + && \ cmake --build build --target install && \ - rm -rf zlib build && \ - rm -f /usr/local/lib/libz.so* + rm -rf wabt build ## Install LLVM -ARG LLVM_TAG=llvmorg-17.0.6 -RUN git clone --depth 1 --branch "$LLVM_TAG" https://github.com/llvm/llvm-project.git -RUN cmake \ - -G Ninja \ - -S llvm-project/llvm \ - -B build \ +ARG LLVM_TAG=llvmorg-18.1.8 +RUN wget -q https://github.com/llvm/llvm-project/archive/refs/tags/${LLVM_TAG}.tar.gz && \ + tar xf ${LLVM_TAG}.tar.gz && \ + rm ${LLVM_TAG}.tar.gz && \ + cmake -G Ninja -S llvm-project-${LLVM_TAG}/llvm -B build \ + "-DLLVM_ENABLE_PROJECTS=clang;lld" \ + "-DLLVM_ENABLE_RUNTIMES=compiler-rt" \ + "-DLLVM_TARGETS_TO_BUILD=WebAssembly;X86;AArch64;ARM;Hexagon;NVPTX;PowerPC;RISCV" \ -DCMAKE_BUILD_TYPE=Release \ -DLLVM_BUILD_32_BITS=OFF \ -DLLVM_ENABLE_ASSERTIONS=ON \ @@ -34,18 +56,17 @@ RUN cmake \ -DLLVM_ENABLE_EH=ON \ -DLLVM_ENABLE_HTTPLIB=OFF \ -DLLVM_ENABLE_IDE=OFF \ + -DLLVM_ENABLE_LIBEDIT=OFF \ -DLLVM_ENABLE_LIBXML2=OFF \ -DLLVM_ENABLE_OCAMLDOC=OFF \ - -DLLVM_ENABLE_PROJECTS="clang;lld" \ -DLLVM_ENABLE_RTTI=ON \ -DLLVM_ENABLE_TERMINFO=OFF \ -DLLVM_ENABLE_WARNINGS=OFF \ - -DLLVM_ENABLE_ZLIB=ON \ + -DLLVM_ENABLE_ZLIB=OFF \ -DLLVM_ENABLE_ZSTD=OFF \ -DLLVM_INCLUDE_BENCHMARKS=OFF \ -DLLVM_INCLUDE_EXAMPLES=OFF \ -DLLVM_INCLUDE_TESTS=OFF \ - -DLLVM_TARGETS_TO_BUILD="X86;ARM;NVPTX;AArch64;Hexagon;PowerPC;WebAssembly" \ && \ cmake --build build --target install && \ - rm -rf llvm-project build + rm -rf llvm-project-${LLVM_TAG} build diff --git a/README.md b/README.md index a9697bf..e682556 100644 --- a/README.md +++ b/README.md @@ -19,10 +19,10 @@ already, the following: the first argument. The `reset-docker.sh` script will delete **everything** from your local Docker instance, so be warned. But it can come in handy when disk space is an issue. - 5. Push the images via + 5. Push the images via: - docker push ghcr.io/halide/manylinux2014_aarch64-llvm:17.0.6 - docker push ghcr.io/halide/manylinux2014_x86_64-llvm:17.0.6 + docker push ghcr.io/halide/manylinux2014_aarch64-llvm:17.0.6 + docker push ghcr.io/halide/manylinux2014_x86_64-llvm:17.0.6 See the docs for more details: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry diff --git a/build-images.sh b/build-images.sh index 767fbd3..b8c73c1 100755 --- a/build-images.sh +++ b/build-images.sh @@ -15,5 +15,5 @@ build_image() { . } -build_image aarch64 +#build_image aarch64 build_image x86_64