From 5dcc9fb08ee8d00fbae9a79b4d976a6b7be98d33 Mon Sep 17 00:00:00 2001 From: David Roberts Date: Mon, 11 Apr 2022 09:43:37 +0100 Subject: [PATCH] [ML] Build PyTorch without Breakpad Breakpad causes the libtorch_cpu.so library to have an executable stack, which is undesirable. Fixes elastic/elasticsearch#85691 --- build-setup/linux.md | 3 ++- dev-tools/docker/build_linux_build_image.sh | 2 +- dev-tools/docker/linux_builder/Dockerfile | 2 +- dev-tools/docker/linux_image/Dockerfile | 1 + dev-tools/docker/linux_tester/Dockerfile | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/build-setup/linux.md b/build-setup/linux.md index bafef89b7b..2055bfceef 100644 --- a/build-setup/linux.md +++ b/build-setup/linux.md @@ -325,7 +325,8 @@ export USE_MKLDNN=ON export USE_QNNPACK=OFF export USE_PYTORCH_QNNPACK=OFF [ $(uname -m) = x86_64 ] && export USE_XNNPACK=OFF -[ $(uname -m) != x86_64 ] && export USE_BREAKPAD=OFF +# Breakpad is undesirable as it causes libtorch_cpu to have an executable stack +export USE_BREAKPAD=OFF export PYTORCH_BUILD_VERSION=1.11.0 export PYTORCH_BUILD_NUMBER=1 /usr/local/gcc103/bin/python3.7 setup.py install diff --git a/dev-tools/docker/build_linux_build_image.sh b/dev-tools/docker/build_linux_build_image.sh index bca085217d..d5a70a29e5 100755 --- a/dev-tools/docker/build_linux_build_image.sh +++ b/dev-tools/docker/build_linux_build_image.sh @@ -34,7 +34,7 @@ sleep 5 HOST=docker.elastic.co ACCOUNT=ml-dev REPOSITORY=ml-linux-build -VERSION=21 +VERSION=22 set -e diff --git a/dev-tools/docker/linux_builder/Dockerfile b/dev-tools/docker/linux_builder/Dockerfile index d454f91bc6..c94cb1b723 100644 --- a/dev-tools/docker/linux_builder/Dockerfile +++ b/dev-tools/docker/linux_builder/Dockerfile @@ -10,7 +10,7 @@ # # Increment the version here when a new tools/3rd party components image is built -FROM docker.elastic.co/ml-dev/ml-linux-build:21 +FROM docker.elastic.co/ml-dev/ml-linux-build:22 MAINTAINER David Roberts diff --git a/dev-tools/docker/linux_image/Dockerfile b/dev-tools/docker/linux_image/Dockerfile index 361e729d79..2c8289faba 100644 --- a/dev-tools/docker/linux_image/Dockerfile +++ b/dev-tools/docker/linux_image/Dockerfile @@ -148,6 +148,7 @@ RUN \ export USE_QNNPACK=OFF && \ export USE_PYTORCH_QNNPACK=OFF && \ export USE_XNNPACK=OFF && \ + export USE_BREAKPAD=OFF && \ export PYTORCH_BUILD_VERSION=1.11.0 && \ export PYTORCH_BUILD_NUMBER=1 && \ /usr/local/bin/python3.7 setup.py install && \ diff --git a/dev-tools/docker/linux_tester/Dockerfile b/dev-tools/docker/linux_tester/Dockerfile index febf32e78e..46ea6f5451 100644 --- a/dev-tools/docker/linux_tester/Dockerfile +++ b/dev-tools/docker/linux_tester/Dockerfile @@ -10,7 +10,7 @@ # # Increment the version here when a new tools/3rd party components image is built -FROM docker.elastic.co/ml-dev/ml-linux-build:21 +FROM docker.elastic.co/ml-dev/ml-linux-build:22 MAINTAINER David Roberts