From 4ee9c562188ae930cb2520cfce7805f55acaf968 Mon Sep 17 00:00:00 2001 From: Johannes M Dieterich Date: Tue, 7 Jan 2020 10:30:56 -0800 Subject: [PATCH] Support PyTorch ROCm CI on Ubuntu18.04 (#31886) Summary: In order to support Ubuntu18.04, some changes to the scripts are required. * install dependencies with -y flag * mark install noninteractive * install some required dependencies (gpg-agent, python3-distutils, libidn11) Pull Request resolved: https://github.com/pytorch/pytorch/pull/31886 Differential Revision: D19300586 Pulled By: bddppq fbshipit-source-id: d7fb815a3845697ce63af191a5bc449d661ff1de --- docker/caffe2/jenkins/common/install_clang.sh | 2 +- docker/caffe2/jenkins/common/install_python.sh | 2 ++ docker/caffe2/jenkins/common/install_rocm.sh | 7 +++++-- docker/caffe2/jenkins/ubuntu-rocm/Dockerfile | 3 +++ 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/docker/caffe2/jenkins/common/install_clang.sh b/docker/caffe2/jenkins/common/install_clang.sh index a4b04c3018..780d3fbfc9 100755 --- a/docker/caffe2/jenkins/common/install_clang.sh +++ b/docker/caffe2/jenkins/common/install_clang.sh @@ -7,7 +7,7 @@ set -ex if [[ "$CLANG_VERSION" == "6.0" || "$CLANG_VERSION" == "7" || "$CLANG_VERSION" == "8" ]]; then apt-get update - apt-get install -y --no-install-recommends software-properties-common wget + apt-get install -y --no-install-recommends software-properties-common wget gpg-agent wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - if [[ "$UBUNTU_VERSION" == 16.04 ]]; then apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-${CLANG_VERSION} main" diff --git a/docker/caffe2/jenkins/common/install_python.sh b/docker/caffe2/jenkins/common/install_python.sh index b22702a3a2..9f504aba86 100755 --- a/docker/caffe2/jenkins/common/install_python.sh +++ b/docker/caffe2/jenkins/common/install_python.sh @@ -32,11 +32,13 @@ install_ubuntu() { ;; 3.6) install_ubuntu_deadsnakes python3.6-dev + apt-get install -y python3-distutils PYTHON=python3.6 INSTALL_SETUPTOOLS=yes ;; 3.7) install_ubuntu_deadsnakes python3.7-dev + apt-get install -y python3-distutils PYTHON=python3.7 INSTALL_SETUPTOOLS=yes ;; diff --git a/docker/caffe2/jenkins/common/install_rocm.sh b/docker/caffe2/jenkins/common/install_rocm.sh index 6294c7c3b0..e59edd4cd0 100644 --- a/docker/caffe2/jenkins/common/install_rocm.sh +++ b/docker/caffe2/jenkins/common/install_rocm.sh @@ -8,8 +8,11 @@ install_ubuntu() { apt-get install -y libopenblas-dev # Need the libc++1 and libc++abi1 libraries to allow torch._C to load at runtime - apt-get install libc++1 - apt-get install libc++abi1 + apt-get install -y libc++1 + apt-get install -y libc++abi1 + + # cmake needs libidn11 + apt-get install -y libidn11 DEB_ROCM_REPO=http://repo.radeon.com/rocm/apt/debian # Add rocm repository diff --git a/docker/caffe2/jenkins/ubuntu-rocm/Dockerfile b/docker/caffe2/jenkins/ubuntu-rocm/Dockerfile index dbec35e06c..b7030912f0 100644 --- a/docker/caffe2/jenkins/ubuntu-rocm/Dockerfile +++ b/docker/caffe2/jenkins/ubuntu-rocm/Dockerfile @@ -1,6 +1,9 @@ ARG UBUNTU_VERSION FROM ubuntu:${UBUNTU_VERSION} +# set this to noninteractive so that the installer knows +ENV DEBIAN_FRONTEND=noninteractive + # Include BUILD_ENVIRONMENT environment variable in image ARG BUILD_ENVIRONMENT ENV BUILD_ENVIRONMENT ${BUILD_ENVIRONMENT}