forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 66
[SOW MS3] Centos stream9 PyTorch image support #1090
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+199
−23
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
9546d1e
changes to build Centos stream 9 images
rraminen c95b27c
Added scripts for centos and centos stream images
rraminen 41ee02b
Added an extra line
rraminen f0a9c9c
Add ninja installation
rraminen 8cd2ca6
Optimized code
rraminen c814792
Fixes
rraminen 011388d
Add comment
jithunnair-amd a8955c8
Optimized code
rraminen 0d5e682
Added AMDGPU mapping for ROCm 5.2 and invalid-url for rocm_baseurl
rraminen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,107 @@ | ||
ARG CENTOS_VERSION | ||
|
||
FROM quay.io/centos/centos:stream${CENTOS_VERSION} | ||
|
||
|
||
# Set AMD gpu targets to build for | ||
ARG PYTORCH_ROCM_ARCH | ||
ENV PYTORCH_ROCM_ARCH ${PYTORCH_ROCM_ARCH} | ||
|
||
# Install required packages to build Caffe2 | ||
|
||
# Install common dependencies (so that this step can be cached separately) | ||
ARG EC2 | ||
ADD ./common/install_base.sh install_base.sh | ||
RUN bash ./install_base.sh && rm install_base.sh | ||
|
||
#Install langpack | ||
RUN yum install -y glibc-langpack-en | ||
|
||
# Update CentOS git version | ||
RUN yum -y remove git | ||
RUN yum -y remove git-* | ||
RUN yum install -y git | ||
|
||
# Install devtoolset | ||
RUN dnf install -y rpmdevtools | ||
ENV BASH_ENV "/etc/profile" | ||
|
||
# Install ninja | ||
RUN dnf --enablerepo=crb install -y ninja-build | ||
|
||
# (optional) Install non-default glibc version | ||
ARG GLIBC_VERSION | ||
ADD ./common/install_glibc.sh install_glibc.sh | ||
RUN if [ -n "${GLIBC_VERSION}" ]; then bash ./install_glibc.sh; fi | ||
RUN rm install_glibc.sh | ||
|
||
# Install user | ||
ADD ./common/install_user.sh install_user.sh | ||
RUN bash ./install_user.sh && rm install_user.sh | ||
|
||
# Install conda and other packages (e.g., numpy, pytest) | ||
ENV PATH /opt/conda/bin:$PATH | ||
ARG ANACONDA_PYTHON_VERSION | ||
ADD requirements-ci.txt /opt/conda/requirements-ci.txt | ||
ADD ./common/install_conda.sh install_conda.sh | ||
RUN bash ./install_conda.sh && rm install_conda.sh | ||
RUN rm /opt/conda/requirements-ci.txt | ||
|
||
# (optional) Install protobuf for ONNX | ||
ARG PROTOBUF | ||
ADD ./common/install_protobuf.sh install_protobuf.sh | ||
RUN if [ -n "${PROTOBUF}" ]; then bash ./install_protobuf.sh; fi | ||
RUN rm install_protobuf.sh | ||
ENV INSTALLED_PROTOBUF ${PROTOBUF} | ||
|
||
# (optional) Install database packages like LMDB and LevelDB | ||
ARG DB | ||
ADD ./common/install_db.sh install_db.sh | ||
RUN if [ -n "${DB}" ]; then bash ./install_db.sh; fi | ||
RUN rm install_db.sh | ||
ENV INSTALLED_DB ${DB} | ||
|
||
# (optional) Install vision packages like OpenCV and ffmpeg | ||
ARG VISION | ||
ADD ./common/install_vision.sh install_vision.sh | ||
RUN if [ -n "${VISION}" ]; then bash ./install_vision.sh; fi | ||
RUN rm install_vision.sh | ||
ENV INSTALLED_VISION ${VISION} | ||
|
||
# Install rocm | ||
ARG ROCM_VERSION | ||
ADD ./common/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 PATH /opt/rocm/llvm/bin:$PATH | ||
ENV MAGMA_HOME /opt/rocm/magma | ||
ENV LANG en_US.utf8 | ||
ENV LC_ALL en_US.utf8 | ||
|
||
# (optional) Install non-default CMake version | ||
ARG CMAKE_VERSION | ||
ADD ./common/install_cmake.sh install_cmake.sh | ||
RUN if [ -n "${CMAKE_VERSION}" ]; then bash ./install_cmake.sh; fi | ||
RUN rm install_cmake.sh | ||
|
||
# (optional) Install non-default Ninja version | ||
ARG NINJA_VERSION | ||
ADD ./common/install_ninja.sh install_ninja.sh | ||
RUN if [ -n "${NINJA_VERSION}" ]; then bash ./install_ninja.sh; fi | ||
RUN rm install_ninja.sh | ||
|
||
# Install ccache/sccache (do this last, so we get priority in PATH) | ||
ADD ./common/install_cache.sh install_cache.sh | ||
ENV PATH /opt/cache/bin:$PATH | ||
RUN bash ./install_cache.sh && rm install_cache.sh | ||
|
||
# Include BUILD_ENVIRONMENT environment variable in image | ||
ARG BUILD_ENVIRONMENT | ||
ENV BUILD_ENVIRONMENT ${BUILD_ENVIRONMENT} | ||
|
||
USER jenkins | ||
CMD ["bash"] |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.