summaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorJunjie Bai <bai@in.tum.de>2018-10-11 16:46:16 -0700
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>2018-10-11 16:48:13 -0700
commit5973312abcb4926d54e85fc596419393c126b3fa (patch)
treeb46bdeced97028250e13bf2800b1cfdbafa70f6f /docker
parenta1487bf8746d1b13d7930d3a522aa2ef2f5b1702 (diff)
downloadpytorch-5973312abcb4926d54e85fc596419393c126b3fa.tar.gz
pytorch-5973312abcb4926d54e85fc596419393c126b3fa.tar.bz2
pytorch-5973312abcb4926d54e85fc596419393c126b3fa.zip
Add clang 6 docker images
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/12581 Differential Revision: D10349785 Pulled By: bddppq fbshipit-source-id: 638641d369be0898dd6232737ebaa9d9a8c2e557
Diffstat (limited to 'docker')
-rwxr-xr-xdocker/caffe2/jenkins/common/install_clang.sh18
-rw-r--r--docker/caffe2/jenkins/ubuntu-rocm/Dockerfile1
2 files changed, 16 insertions, 3 deletions
diff --git a/docker/caffe2/jenkins/common/install_clang.sh b/docker/caffe2/jenkins/common/install_clang.sh
index fbf5515bae..f3fab7f265 100755
--- a/docker/caffe2/jenkins/common/install_clang.sh
+++ b/docker/caffe2/jenkins/common/install_clang.sh
@@ -3,16 +3,28 @@
set -ex
[ -n "$CLANG_VERSION" ]
+[ -n "$UBUNTU_VERSION" ]
-if [[ "$CLANG_VERSION" == "7" ]]; then
+if [[ "$CLANG_VERSION" == "6.0" || "$CLANG_VERSION" == "7" ]]; then
apt-get update
apt-get install -y --no-install-recommends software-properties-common wget
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
- apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main"
+ if [[ "$UBUNTU_VERSION" == 16.04 ]]; then
+ apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-${CLANG_VERSION} main"
+ elif [[ "$UBUNTU_VERSION" == 17.10 ]]; then
+ apt-add-repository "deb http://apt.llvm.org/artful/ llvm-toolchain-artful-${CLANG_VERSION} main"
+ elif [[ "$UBUNTU_VERSION" == 18.04 ]]; then
+ apt-add-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-${CLANG_VERSION} main"
+ elif [[ "$UBUNTU_VERSION" == 18.10 ]]; then
+ apt-add-repository "deb http://apt.llvm.org/cosmic/ llvm-toolchain-cosmic-${CLANG_VERSION} main"
+ else
+ echo "Invalid Ubuntu version: ${UBUNTU_VERSION}"
+ exit 1
+ fi
fi
apt-get update
-apt-get install -y --no-install-recommends clang-"$CLANG_VERSION"
+apt-get install -y --no-install-recommends clang-"$CLANG_VERSION" libclang-"$CLANG_VERSION"-dev
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Use update-alternatives to make this version the default
diff --git a/docker/caffe2/jenkins/ubuntu-rocm/Dockerfile b/docker/caffe2/jenkins/ubuntu-rocm/Dockerfile
index c42d86b3ce..5825dda0f8 100644
--- a/docker/caffe2/jenkins/ubuntu-rocm/Dockerfile
+++ b/docker/caffe2/jenkins/ubuntu-rocm/Dockerfile
@@ -2,6 +2,7 @@ ARG UBUNTU_VERSION
FROM ubuntu:${UBUNTU_VERSION}
ARG EC2
+ARG UBUNTU_VERSION
ADD ./install_base.sh install_base.sh
RUN bash ./install_base.sh && rm install_base.sh