Remove buildbot scripts These are now upstream in llvm/llvm-zorg.
diff --git a/.github/workflows/buildbot-container.yml b/.github/workflows/buildbot-container.yml deleted file mode 100644 index 5adc8d7..0000000 --- a/.github/workflows/buildbot-container.yml +++ /dev/null
@@ -1,73 +0,0 @@ -name: Build Buildbot Container - -permissions: - contents: read - packages: write - -on: - push: - branches: - - main - paths: - - .github/workflows/buildbot-container.yml - - buildbot/Dockerfile - - buildbot/build_tflite.sh - - Pipfile - - Pipfile.lock.3.10 - - Pipfile.lock.3.11 - - versioned_pipenv - pull_request: - paths: - - .github/workflows/buildbot-container.yml - - buildbot/Dockerfile - - buildbot/build_tflite.sh - - Pipfile - - Pipfile.lock.3.10 - - Pipfile.lock.3.11 - - versioned_pipenv - workflow_dispatch: - -jobs: - build-and-push: - runs-on: ubuntu-26.04 - env: - IMAGE_NAME: ghcr.io/${{ github.repository }}/mlgo-buildbot-deps - steps: - - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - name: Build container image - run: | - docker build \ - --provenance=false \ - --sbom=false \ - -f buildbot/Dockerfile \ - -t "${IMAGE_NAME}:${GITHUB_SHA}" \ - -t "${IMAGE_NAME}:latest" \ - . - - - name: Verify container dependencies - run: | - docker run --rm "${IMAGE_NAME}:latest" bash -ec ' - test -s /tflite/tflite.cmake - buildbot-worker --version - clang --version - cmake --version - ninja --version - ccache --version - python3 -c "import os, tensorflow as tf; assert os.path.isdir(os.path.join(os.path.dirname(tf.__file__), \"xla_aot_runtime_src\"))" - ' - - - name: Log in to GitHub Container Registry - if: github.event_name != 'pull_request' && github.repository == 'google/ml-compiler-opt' - uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Push container image to ghcr.io - if: github.event_name != 'pull_request' && github.repository == 'google/ml-compiler-opt' - run: | - docker push "${IMAGE_NAME}:${GITHUB_SHA}" - docker push "${IMAGE_NAME}:latest"
diff --git a/buildbot/Dockerfile b/buildbot/Dockerfile deleted file mode 100644 index fd6e548..0000000 --- a/buildbot/Dockerfile +++ /dev/null
@@ -1,93 +0,0 @@ -# Copyright 2020 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -FROM debian:12 -LABEL org.opencontainers.image.source="https://github.com/google/ml-compiler-opt" - -ENV DEBIAN_FRONTEND=noninteractive -ENV LLVM_MAJOR_VERSION=22 - -RUN dpkg --add-architecture i386 && \ - apt-get update && \ - apt-get install -y --no-install-recommends \ - automake \ - binutils-dev \ - ca-certificates \ - ccache \ - curl \ - dos2unix \ - g++-multilib \ - gawk \ - gcc-multilib \ - git \ - gnupg \ - libgcrypt-dev \ - libgss-dev \ - liblzma-dev \ - libssl-dev \ - libtool \ - libxml2-dev \ - lsb-release \ - m4 \ - ninja-build \ - pkg-config \ - procps \ - python-is-python3 \ - python3 \ - python3-dev \ - python3-distutils \ - python3-pip \ - python3-venv \ - software-properties-common \ - sudo \ - tmux \ - wget \ - zlib1g-dev && \ - echo "deb http://deb.debian.org/debian bookworm-backports main" > /etc/apt/sources.list.d/bookworm-backports.list && \ - apt-get update && \ - apt-get install -y --no-install-recommends -t bookworm-backports cmake cmake-data && \ - bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ${LLVM_MAJOR_VERSION} && \ - ln -sf /usr/bin/clang-${LLVM_MAJOR_VERSION} /usr/bin/clang && \ - ln -sf /usr/bin/clang++-${LLVM_MAJOR_VERSION} /usr/bin/clang++ && \ - ln -sf /usr/bin/clang-${LLVM_MAJOR_VERSION} /usr/bin/cc && \ - ln -sf /usr/bin/clang++-${LLVM_MAJOR_VERSION} /usr/bin/c++ && \ - ln -sf /usr/bin/ld.lld-${LLVM_MAJOR_VERSION} /usr/bin/ld && \ - ln -sf /usr/bin/ld.lld-${LLVM_MAJOR_VERSION} /usr/bin/ld.lld && \ - rm -rf /var/lib/apt/lists/* - -RUN cat <<'EOF' > /etc/ccache.conf -sloppiness = pch_defines,time_macros -depend_mode = true -run_second_cpp = true -hash_dir = true -EOF - -RUN mkdir -p /tflite -WORKDIR /tflite -COPY buildbot/build_tflite.sh /tmp/build_tflite.sh -RUN bash /tmp/build_tflite.sh && rm /tmp/build_tflite.sh - -COPY Pipfile Pipfile.lock.3.10 Pipfile.lock.3.11 versioned_pipenv /tmp/mlgo-pipenv/ -RUN python3 -m pip install --no-cache-dir --break-system-packages pipenv buildbot-worker==2.9.0 && \ - cd /tmp/mlgo-pipenv && \ - python3 versioned_pipenv sync --extra-pip-args="--break-system-packages" --categories "packages dev-packages" --system && \ - cd / && \ - rm -rf /tmp/mlgo-pipenv /root/.cache && \ - curl -fsSL --retry 10 https://raw.githubusercontent.com/llvm/llvm-project/main/llvm/tools/llvm-ir2vec/Bindings/requirements.txt -o /tmp/ir2vec-reqs.txt && \ - python3 -m pip install --no-cache-dir --break-system-packages -r /tmp/ir2vec-reqs.txt && \ - rm -f /tmp/ir2vec-reqs.txt && \ - python3 -c "import os, tensorflow as tf; assert os.path.isdir(os.path.join(os.path.dirname(tf.__file__), 'xla_aot_runtime_src'))" - -ENV TFLITE_CMAKE=/tflite/tflite.cmake -WORKDIR /
diff --git a/buildbot/build_tflite.sh b/buildbot/build_tflite.sh deleted file mode 100755 index 199e4a9..0000000 --- a/buildbot/build_tflite.sh +++ /dev/null
@@ -1,171 +0,0 @@ -#!/bin/bash -# Copyright 2020 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -set -e - -readonly CPUINFO_REPOSITORY="https://github.com/pytorch/cpuinfo" -readonly CPUINFO_TAG="05332fd802d9109a2a151ec32154b107c1e5caf9" - -readonly RUY_REPOSITORY="https://github.com/google/ruy" -readonly RUY_TAG="c08ec529fc91722bde519628d9449258082eb847" - -readonly ABSEIL_REPOSITORY="https://github.com/abseil/abseil-cpp" -readonly ABSEIL_TAG="1278ee9bd9bd4916181521fac96d6fa1100e38e6" - -readonly EIGEN_REPOSITORY="https://gitlab.com/libeigen/eigen" -readonly EIGEN_TAG="d791d48859c6fc7850c9fd5270d2b236c818068d" - -readonly NEON_2_SSE_REPOSITORY="https://github.com/intel/ARM_NEON_2_x86_SSE" -readonly NEON_2_SSE_TAG="6315d3c5007e6c209eb77abae4deece4978d8dbc" - -readonly FLATBUFFERS_REPOSITORY="https://github.com/google/flatbuffers" -readonly FLATBUFFERS_TAG="fb9afbafc7dfe226b9db54d4923bfb8839635274" - -readonly GEMMLOWP_REPOSITORY="https://github.com/google/gemmlowp" -readonly GEMMLOWP_TAG="16e8662c34917be0065110bfcd9cc27d30f52fdf" - -readonly ML_DTYPES_REPOSITORY="https://github.com/jax-ml/ml_dtypes" -readonly ML_DTYPES_TAG="f739b2f0256d543e68caf214cd54b367302fbf68" - -readonly TENSORFLOW_REPOSITORY="https://github.com/tensorflow/tensorflow" -readonly TENSORFLOW_TAG="bbed5f60cd2efbbc3f1032a4e7f9fe393a1760af" - -function clone_and_checkout { - local repo="$1" - local tag="$2" - local dest="$3" - local sleep_seconds=30 - for i in $(seq 1 5); do - rm -rf "${dest}" - if git clone --filter=tree:0 --no-checkout "${repo}" "${dest}" && \ - git -C "${dest}" checkout "${tag}"; then - return 0 - fi - sleep "${sleep_seconds}" - sleep_seconds=$((sleep_seconds + 30)) - done - return 1 -} - -# cpuinfo -clone_and_checkout ${CPUINFO_REPOSITORY} ${CPUINFO_TAG} cpuinfo/src/cpuinfo -cmake -GNinja -S cpuinfo/src/cpuinfo -B cpuinfo/src/cpuinfo-build \ - -DCMAKE_FIND_PACKAGE_PREFER_CONFIG:BOOL=ON \ - -DCMAKE_INSTALL_PREFIX:PATH=${PWD}/cpuinfo \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON \ - -DCPUINFO_BUILD_UNIT_TESTS:BOOL=OFF \ - -DCPUINFO_BUILD_MOCK_TESTS:BOOL=OFF \ - -DCPUINFO_BUILD_BENCHMARKS:BOOL=OFF -ninja -C cpuinfo/src/cpuinfo-build install - -# ruy -clone_and_checkout ${RUY_REPOSITORY} ${RUY_TAG} ruy/src/ruy -cmake -GNinja -S ruy/src/ruy -B ruy/src/ruy-build \ - -DCMAKE_FIND_PACKAGE_PREFER_CONFIG:BOOL=ON \ - -DCMAKE_INSTALL_PREFIX:PATH=${PWD}/ruy \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON \ - -Dcpuinfo_DIR:PATH=${PWD}/cpuinfo/share/cpuinfo \ - -DRUY_MINIMAL_BUILD:BOOL=ON \ - -DRUY_ENABLE_INSTALL:BOOL=ON \ - -DRUY_FIND_CPUINFO:BOOL=ON -ninja -C ruy/src/ruy-build install - -# absl -clone_and_checkout ${ABSEIL_REPOSITORY} ${ABSEIL_TAG} abseil-cpp/src/abseil-cpp -cmake -GNinja -S abseil-cpp/src/abseil-cpp -B abseil-cpp/src/abseil-cpp-build \ - -DCMAKE_FIND_PACKAGE_PREFER_CONFIG:BOOL=ON \ - -DCMAKE_INSTALL_PREFIX:PATH=${PWD}/abseil-cpp \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON \ - -DABSL_BUILD_TESTING:BOOL=OFF \ - -DABSL_ENABLE_INSTALL:BOOL=ON -ninja -C abseil-cpp/src/abseil-cpp-build install - -# eigen -clone_and_checkout ${EIGEN_REPOSITORY} ${EIGEN_TAG} eigen/src/eigen -cmake -GNinja -S eigen/src/eigen -B eigen/src/eigen-build \ - -DCMAKE_FIND_PACKAGE_PREFER_CONFIG:BOOL=ON \ - -DCMAKE_INSTALL_PREFIX:PATH=${PWD}/eigen \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON \ - -DEIGEN_BUILD_DOC:BOOL=OFF \ - -DEIGEN_BUILD_TESTING:BOOL=OFF -ninja -C eigen/src/eigen-build install - -# ARM_NEON_2_x86_SSE -clone_and_checkout ${NEON_2_SSE_REPOSITORY} ${NEON_2_SSE_TAG} ARM_NEON_2_x86_SSE/src/ARM_NEON_2_x86_SSE -cmake -GNinja -S ARM_NEON_2_x86_SSE/src/ARM_NEON_2_x86_SSE -B ARM_NEON_2_x86_SSE/src/ARM_NEON_2_x86_SSE-build \ - -DCMAKE_FIND_PACKAGE_PREFER_CONFIG:BOOL=ON \ - -DCMAKE_INSTALL_PREFIX:PATH=${PWD}/ARM_NEON_2_x86_SSE \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON -ninja -C ARM_NEON_2_x86_SSE/src/ARM_NEON_2_x86_SSE-build install - -# flatbuffers -clone_and_checkout ${FLATBUFFERS_REPOSITORY} ${FLATBUFFERS_TAG} flatbuffers/src/flatbuffers -cmake -GNinja -S flatbuffers/src/flatbuffers -B flatbuffers/src/flatbuffers-build \ - -DCMAKE_FIND_PACKAGE_PREFER_CONFIG:BOOL=ON \ - -DCMAKE_INSTALL_PREFIX:PATH=${PWD}/flatbuffers \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON \ - -DFLATBUFFERS_BUILD_TESTS:BOOL=OFF -ninja -C flatbuffers/src/flatbuffers-build install - -# gemmlowp -clone_and_checkout ${GEMMLOWP_REPOSITORY} ${GEMMLOWP_TAG} gemmlowp/src/gemmlowp -cmake -GNinja -S gemmlowp/src/gemmlowp/contrib -B gemmlowp/src/gemmlowp-build \ - -DCMAKE_INSTALL_PREFIX:PATH=${PWD}/gemmlowp \ - -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON \ - -DCMAKE_INSTALL_LIBDIR=lib -ninja -C gemmlowp/src/gemmlowp-build install - -# ml_dtypes -clone_and_checkout ${ML_DTYPES_REPOSITORY} ${ML_DTYPES_TAG} ml_dtypes/src/ml_dtypes - -# tflite -clone_and_checkout ${TENSORFLOW_REPOSITORY} ${TENSORFLOW_TAG} tensorflow/src/tensorflow -cmake -GNinja -S tensorflow/src/tensorflow/tensorflow/lite -B tensorflow/src/tensorflow-build \ - -DCMAKE_FIND_PACKAGE_PREFER_CONFIG:BOOL=ON \ - -DCMAKE_INSTALL_PREFIX:PATH=${PWD}/tensorflow \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DCMAKE_FIND_PACKAGE_PREFER_CONFIG:BOOL=ON \ - -DTFLITE_ENABLE_INSTALL:BOOL=ON \ - -DTFLITE_ENABLE_XNNPACK:BOOL=OFF \ - -Dcpuinfo_DIR:PATH=${PWD}/cpuinfo/share/cpuinfo \ - -Druy_DIR:PATH=${PWD}/ruy/lib/cmake/ruy \ - -Dabsl_DIR:PATH=${PWD}/abseil-cpp/lib/cmake/absl \ - -DEigen3_DIR:PATH=${PWD}/eigen/share/eigen3/cmake \ - -Dgemmlowp_DIR:PATH=${PWD}/gemmlowp/lib/cmake/gemmlowp \ - -DNEON_2_SSE_DIR:PATH=${PWD}/ARM_NEON_2_x86_SSE/lib/cmake/NEON_2_SSE \ - -DFlatBuffers_DIR:PATH=${PWD}/flatbuffers/lib/cmake/flatbuffers \ - -DML_DTYPES_SOURCE_DIR:PATH=${PWD}/ml_dtypes/src/ml_dtypes -ninja -C tensorflow/src/tensorflow-build install - -# CMake cache file -cat <<EOF >>tflite.cmake -set(cpuinfo_DIR "${PWD}/cpuinfo/share/cpuinfo" CACHE PATH "") -set(ruy_DIR "${PWD}/ruy/lib/cmake/ruy" CACHE PATH "") -set(absl_DIR "${PWD}/abseil-cpp/lib/cmake/absl" CACHE PATH "") -set(Eigen3_DIR "${PWD}/eigen/share/eigen3/cmake" CACHE PATH "") -set(NEON_2_SSE_DIR "${PWD}/ARM_NEON_2_x86_SSE/lib/cmake/NEON_2_SSE" CACHE PATH "") -set(gemmlowp_DIR "${PWD}/gemmlowp/lib/cmake/gemmlowp" CACHE PATH "") -set(FlatBuffers_DIR "${PWD}/flatbuffers/lib/cmake/flatbuffers" CACHE PATH "") -set(tensorflow-lite_DIR "${PWD}/tensorflow/lib/cmake/tensorflow-lite" CACHE PATH "") -set(TENSORFLOW_SRC_DIR "${PWD}/tensorflow/src/tensorflow" CACHE PATH "") -set(LLVM_HAVE_TFLITE ON CACHE BOOL "") -EOF
diff --git a/buildbot/buildbot_init.sh b/buildbot/buildbot_init.sh deleted file mode 100644 index 93d83d4..0000000 --- a/buildbot/buildbot_init.sh +++ /dev/null
@@ -1,113 +0,0 @@ -# Copyright 2020 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -#!/bin/bash - -# Script to configure GCE instance to run LLVM ml-driven optimization build bots. - -# NOTE: GCE can wait up to 20 hours before reloading this file. -# If some instance needs changes sooner just shutdown the instance -# with GCE UI or "sudo shutdown now" over ssh. GCE will recreate -# the instance and reload the script. - -function on_error { - echo $1 - # FIXME: ON_ERROR should shutdown. Echo-ing for now, for experimentation - # shutdown now -} - -SERVER_PORT=${SERVER_PORT:-9990} - -echo "${HOSTNAME} using server port ${SERVER_PORT}" - -BOT_DIR=/b - -mount -t tmpfs tmpfs /tmp -mkdir -p $BOT_DIR -mount -t tmpfs tmpfs -o size=80% $BOT_DIR - -WORKER_NAME="$(hostname)" -WORKER_PASSWORD="$(gcloud storage cat gs://ml-compiler-opt-buildbot/buildbot_password)" - -function start_buildbot_worker { - set -ex - local repro_doc="${1:?Missing reproduction document name}" - - userdel buildbot 2>/dev/null || true - groupadd -f buildbot - useradd buildbot -g buildbot -m -d "${BOT_DIR}/home" - rm -rf /var/lib/buildbot - ln -s "${BOT_DIR}/home" /var/lib/buildbot - chmod 777 /var/lib/buildbot - - chown buildbot:buildbot "${BOT_DIR}" - rm -f "${BOT_DIR}/buildbot.tac" - - mkdir -p /var/lib/buildbot/workers - [[ -d /var/lib/buildbot/workers/b ]] || ln -s "${BOT_DIR}" /var/lib/buildbot/workers/b - - while pkill buildbot-worker; do sleep 5; done - - rm -rf "${BOT_DIR}/buildbot.tac" "${BOT_DIR}/twistd.log" - echo "Starting build worker ${WORKER_NAME}" - sudo -i -u buildbot buildbot-worker create-worker -f --allow-shutdown=signal "${BOT_DIR}" "lab.llvm.org:${SERVER_PORT}" \ - "${WORKER_NAME}" "${WORKER_PASSWORD}" - - echo "Mircea Trofin <mtrofin@google.com>" > "${BOT_DIR}/info/admin" - - { - echo "How to reproduce locally: https://github.com/google/ml-compiler-opt/blob/main/buildbot/${repro_doc}" - echo - uname -a | head -n1 - date - cmake --version | head -n1 - c++ --version | head -n1 - ld --version | head -n1 - lscpu - } > "${BOT_DIR}/info/host" - - chown -R buildbot:buildbot "${BOT_DIR}" - sudo -i -u buildbot buildbot-worker start "${BOT_DIR}" -} - -function run_bot_script { - local script_name="$1" - local script_dir="" - if [[ -n "${BASH_SOURCE[0]:-}" ]]; then - script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" - fi - if [[ -n "${script_dir}" && -f "${script_dir}/${script_name}" ]]; then - source "${script_dir}/${script_name}" - else - local tmp_script="/tmp/${script_name}" - curl -fsSL --retry 10 "https://raw.githubusercontent.com/google/ml-compiler-opt/main/buildbot/${script_name}" -o "${tmp_script}" \ - || { on_error "Failed to download ${script_name}."; exit 1; } - source "${tmp_script}" - fi -} - -if [[ "${HOSTNAME}" == ml-opt-dev* ]] -then - run_bot_script "buildbot_init_dev.sh" -elif [[ "${HOSTNAME}" == ml-opt-rel* ]] -then - run_bot_script "buildbot_init_rel.sh" -else - on_error "Unrecognized bot hostname: ${HOSTNAME}" - exit 1 -fi - -sleep 30 -cat $BOT_DIR/twistd.log -grep "worker is ready" $BOT_DIR/twistd.log || on_error "build worker not ready"
diff --git a/buildbot/buildbot_init_dev.sh b/buildbot/buildbot_init_dev.sh deleted file mode 100755 index ae48b29..0000000 --- a/buildbot/buildbot_init_dev.sh +++ /dev/null
@@ -1,86 +0,0 @@ -#!/bin/bash -# Copyright 2020 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -systemctl stop docker.service docker.socket 2>/dev/null || true -mkdir -p /var/lib/docker -mount -t tmpfs tmpfs -o size=50% /var/lib/docker - -( - SLEEP=0 - for i in `seq 1 5`; do - sleep $SLEEP - SLEEP=$(( SLEEP + 10)) - - ( - set -ex - echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections - dpkg --configure -a - apt-get clean - apt-get -qq -y update --allow-releaseinfo-change - - # Logs consume a lot of storage space. - apt-get remove -qq -y --purge auditd puppet-agent rsync rsyslog - # Remove Debian's unpatched Docker/runc packages if present (avoid --purge while /var/lib/docker is mounted). - apt-get remove -qq -y docker.io containerd runc - - apt-get install -qq -y --no-install-recommends ca-certificates curl tmux - install -m 0755 -d /etc/apt/keyrings - curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc - chmod a+r /etc/apt/keyrings/docker.asc - cat <<EOF > /etc/apt/sources.list.d/docker.sources -Types: deb -URIs: https://download.docker.com/linux/debian -Suites: $(. /etc/os-release && echo "${VERSION_CODENAME}") -Components: stable -Architectures: $(dpkg --print-architecture) -Signed-By: /etc/apt/keyrings/docker.asc -EOF - apt-get -qq -y update - apt-get install -qq -y --no-install-recommends docker-ce docker-ce-cli containerd.io - apt-get clean - systemctl restart docker - ) && exit 0 - done - exit 1 -) || on_error "Failed to install Docker." - -DOCKER_IMAGE="${DOCKER_IMAGE:-ghcr.io/google/ml-compiler-opt/mlgo-buildbot-deps:latest}" -( - SLEEP=0 - for i in `seq 1 5`; do - sleep $SLEEP - SLEEP=$(( SLEEP + 10)) - docker pull "${DOCKER_IMAGE}" && exit 0 - done - exit 1 -) || on_error "Failed to pull Docker image ${DOCKER_IMAGE}." - -docker rm -f mlgo-buildbot 2>/dev/null || true -docker run -d \ - --name mlgo-buildbot \ - --restart unless-stopped \ - --network host \ - --hostname "${WORKER_NAME}" \ - -v "${BOT_DIR}:${BOT_DIR}" \ - "${DOCKER_IMAGE}" \ - sleep infinity || on_error "Failed to start mlgo-buildbot container." - -docker exec \ - -e BOT_DIR="${BOT_DIR}" \ - -e SERVER_PORT="${SERVER_PORT}" \ - -e WORKER_NAME="${WORKER_NAME}" \ - -e WORKER_PASSWORD="${WORKER_PASSWORD}" \ - mlgo-buildbot bash -c "$(declare -f start_buildbot_worker); start_buildbot_worker BuildBotReproduceLocallyDev.md" \ - || on_error "Failed to start buildbot worker in container."
diff --git a/buildbot/buildbot_init_rel.sh b/buildbot/buildbot_init_rel.sh deleted file mode 100755 index 9ae8c94..0000000 --- a/buildbot/buildbot_init_rel.sh +++ /dev/null
@@ -1,97 +0,0 @@ -#!/bin/bash -# Copyright 2020 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -TF_API_DEP_PACKAGES="python3 python3-pip" -ADMIN_PACKAGES="tmux" - -( - SLEEP=0 - for i in `seq 1 5`; do - sleep $SLEEP - SLEEP=$(( SLEEP + 10)) - - ( - set -ex - - dpkg --add-architecture i386 - echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections - dpkg --configure -a - apt-get clean - apt-get -qq -y update --allow-releaseinfo-change - - # Logs consume a lot of storage space. - apt-get remove -qq -y --purge auditd puppet-agent rsync rsyslog libheif1 - - apt-get install -qq -y --no-install-recommends \ - python3-distutils \ - python-is-python3 \ - $TF_API_DEP_PACKAGES \ - $ADMIN_PACKAGES \ - ccache \ - binutils-dev \ - ninja-build \ - pkg-config \ - gcc-multilib \ - g++-multilib \ - gawk \ - dos2unix \ - libxml2-dev \ - git \ - libtool \ - m4 \ - automake \ - libgcrypt-dev \ - liblzma-dev \ - libssl-dev \ - libgss-dev \ - python3-dev \ - wget \ - zlib1g-dev \ - lsb-release \ - software-properties-common \ - gnupg - - # LLVM 24 will require CMake 3.31; Debian 12 ships 3.25. - echo "deb http://deb.debian.org/debian bookworm-backports main" > /etc/apt/sources.list.d/bookworm-backports.list - apt-get -qq -y update - apt-get install -qq -y --no-install-recommends -t bookworm-backports cmake cmake-data - - export LLVM_MAJOR_VERSION=22 - bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ${LLVM_MAJOR_VERSION} - ln -sf /usr/bin/clang-${LLVM_MAJOR_VERSION} /usr/bin/cc - ln -sf /usr/bin/clang++-${LLVM_MAJOR_VERSION} /usr/bin/c++ - ln -sf /usr/bin/ld.lld-${LLVM_MAJOR_VERSION} /usr/bin/ld - - ) && exit 0 - done - exit 1 -) || on_error "Failed to install required packages." - -# BEGIN stopgap until zorg-side LLVM_CCACHE_BUILD propagates -cat << 'EOF' > /etc/ccache.conf -sloppiness = pch_defines,time_macros -depend_mode = true -run_second_cpp = true -hash_dir = true -EOF -# END - -# Install IR2Vec Python binding dependencies. -# Installs from llvm-project main; canonical source is -# llvm/tools/llvm-ir2vec/Bindings/requirements.txt -curl -L --retry 10 https://raw.githubusercontent.com/llvm/llvm-project/main/llvm/tools/llvm-ir2vec/Bindings/requirements.txt > /tmp/ir2vec-reqs.txt -python3 -m pip install --break-system-packages -r /tmp/ir2vec-reqs.txt buildbot-worker==2.9.0 - -( start_buildbot_worker "BuildBotReproduceLocallyRel.md" ) || on_error "Failed to start buildbot worker on host."