forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to packaged Thrust on Ubuntu, enable CentOS 7.5 as a CI target (…
…pytorch#12899) Summary: 1) Use the hip-thrust version of Thrust as opposed to the GH master. (ROCm 267) 2) CentOS 7.5 docker (ROCm 279) * Always install the libraries at docker creation for ubuntu. * Add Dockerfile for CentOS ROCm * Enable the centos build * Source devtoolset in bashrc * Set locales correctly depending on whether we are on Ubuntu or CentOS * Install a newer cmake for CentOS * Checkout thrust as there is no package for CentOS yet. PyTorch/Caffe2 on ROCm passed tests: ROCm#280 For attention: bddppq ezyang Docker rebuild for Ubuntu not urgent (getting rid of Thrust checkout and package install is mainly cosmetic). If docker for CentOS 7.5 is wanted, build is necessary. Build of PyTorch tested by me in CentOS docker. PyTorch unit tests work mostly, however, a test in test_jit causes a python recursion error that seems to be due to the python2 on CentOS as we haven't ever seen this on Ubuntu - hence please do not enable unit tests. Pull Request resolved: pytorch#12899 Differential Revision: D13029424 Pulled By: bddppq fbshipit-source-id: 1ca8f4337ec6a603f2742fc81046d5b8f8717c76
- Loading branch information
1 parent
1caa341
commit 53a3c46
Showing
18 changed files
with
200 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
ARG CENTOS_VERSION | ||
FROM centos:${CENTOS_VERSION} | ||
|
||
# Install required packages to build Caffe2 | ||
ARG EC2 | ||
ADD ./install_base.sh install_base.sh | ||
RUN bash ./install_base.sh && rm install_base.sh | ||
|
||
# Install devtoolset | ||
ARG DEVTOOLSET_VERSION | ||
ADD ./install_devtoolset.sh install_devtoolset.sh | ||
RUN bash ./install_devtoolset.sh | ||
RUN rm install_devtoolset.sh | ||
ENV BASH_ENV "/etc/profile" | ||
|
||
# Install rocm | ||
ARG ROCM_VERSION | ||
ADD ./install_rocm.sh install_rocm.sh | ||
RUN bash ./install_rocm.sh | ||
RUN rm install_rocm.sh | ||
ENV PATH /opt/rocm/bin:$PATH | ||
ENV PATH /opt/rocm/hcc/bin:$PATH | ||
ENV PATH /opt/rocm/hip/bin:$PATH | ||
ENV PATH /opt/rocm/opencl/bin:$PATH | ||
ENV MIOPEN_DISABLE_CACHE 1 | ||
ENV HIP_PLATFORM hcc | ||
ENV LC_ALL en_US.utf8 | ||
ENV LANG en_US.utf8 | ||
|
||
# Install non-default CMake version | ||
ARG CMAKE_VERSION | ||
ADD ./install_cmake.sh install_cmake.sh | ||
RUN if [ -n "${CMAKE_VERSION}" ]; then bash ./install_cmake.sh; fi | ||
RUN rm install_cmake.sh | ||
|
||
# Compile/install ccache for faster builds | ||
ADD ./install_ccache.sh install_ccache.sh | ||
RUN bash ./install_ccache.sh && rm install_ccache.sh | ||
|
||
# Install Python | ||
ARG PYTHON_VERSION | ||
ADD ./install_python.sh install_python.sh | ||
RUN if [ -n "${PYTHON_VERSION}" ]; then bash ./install_python.sh; fi | ||
RUN rm install_python.sh | ||
|
||
# (optional) Add Jenkins user | ||
ARG JENKINS | ||
ARG JENKINS_UID | ||
ARG JENKINS_GID | ||
ADD ./add_jenkins_user.sh add_jenkins_user.sh | ||
RUN if [ -n "${JENKINS}" ]; then bash ./add_jenkins_user.sh; fi | ||
RUN rm add_jenkins_user.sh | ||
|
||
# Include BUILD_ENVIRONMENT environment variable in image | ||
ARG BUILD_ENVIRONMENT | ||
ENV BUILD_ENVIRONMENT ${BUILD_ENVIRONMENT} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
[ -n "$DEVTOOLSET_VERSION" ] | ||
|
||
yum install -y centos-release-scl | ||
yum install -y devtoolset-$DEVTOOLSET_VERSION | ||
|
||
echo "source scl_source enable devtoolset-$DEVTOOLSET_VERSION" > "/etc/profile.d/devtoolset-$DEVTOOLSET_VERSION.sh" |
Oops, something went wrong.