1
1
ARG CENTOS_VERSION
2
2
3
- FROM centos: ${CENTOS_VERSION}
3
+ FROM quay.io/ centos/centos:stream ${CENTOS_VERSION}
4
4
5
- ARG CENTOS_VERSION
6
5
7
6
# Set AMD gpu targets to build for
8
7
ARG PYTORCH_ROCM_ARCH
@@ -11,23 +10,25 @@ ENV PYTORCH_ROCM_ARCH ${PYTORCH_ROCM_ARCH}
11
10
# Install required packages to build Caffe2
12
11
13
12
# Install common dependencies (so that this step can be cached separately)
13
+ ARG EC2
14
14
COPY ./common/install_base.sh install_base.sh
15
15
RUN bash ./install_base.sh && rm install_base.sh
16
16
17
+ # Install langpack
18
+ RUN yum install -y glibc-langpack-en
19
+
17
20
# Update CentOS git version
18
21
RUN yum -y remove git
19
22
RUN yum -y remove git-*
20
- RUN yum -y install https://packages.endpoint.com/rhel/7/os/x86_64/endpoint-repo-1.9-1.x86_64.rpm || \
21
- (yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo-1.9-1.x86_64.rpm && \
22
- sed -i "s/packages.endpoint/packages.endpointdev/" /etc/yum.repos.d/endpoint.repo)
23
23
RUN yum install -y git
24
24
25
25
# Install devtoolset
26
- ARG DEVTOOLSET_VERSION
27
- COPY ./common/install_devtoolset.sh install_devtoolset.sh
28
- RUN bash ./install_devtoolset.sh && rm install_devtoolset.sh
26
+ RUN dnf install -y rpmdevtools
29
27
ENV BASH_ENV "/etc/profile"
30
28
29
+ # Install ninja
30
+ RUN dnf --enablerepo=crb install -y ninja-build
31
+
31
32
# (optional) Install non-default glibc version
32
33
ARG GLIBC_VERSION
33
34
COPY ./common/install_glibc.sh install_glibc.sh
@@ -41,6 +42,7 @@ RUN bash ./install_user.sh && rm install_user.sh
41
42
# Install conda and other packages (e.g., numpy, pytest)
42
43
ARG ANACONDA_PYTHON_VERSION
43
44
ARG CONDA_CMAKE
45
+ ARG BUILD_ENVIRONMENT
44
46
ENV ANACONDA_PYTHON_VERSION=$ANACONDA_PYTHON_VERSION
45
47
ENV PATH /opt/conda/envs/py_$ANACONDA_PYTHON_VERSION/bin:/opt/conda/bin:$PATH
46
48
COPY requirements-ci.txt /opt/conda/requirements-ci.txt
@@ -55,7 +57,14 @@ RUN if [ -n "${PROTOBUF}" ]; then bash ./install_protobuf.sh; fi
55
57
RUN rm install_protobuf.sh
56
58
ENV INSTALLED_PROTOBUF ${PROTOBUF}
57
59
58
- # (optional) Install vision packages like OpenCV
60
+ # (optional) Install database packages like LMDB and LevelDB
61
+ ARG DB
62
+ COPY ./common/install_db.sh install_db.sh
63
+ RUN if [ -n "${DB}" ]; then bash ./install_db.sh; fi
64
+ RUN rm install_db.sh
65
+ ENV INSTALLED_DB ${DB}
66
+
67
+ # (optional) Install vision packages like OpenCV and ffmpeg
59
68
ARG VISION
60
69
COPY ./common/install_vision.sh ./common/cache_vision_models.sh ./common/common_utils.sh ./
61
70
RUN if [ -n "${VISION}" ]; then bash ./install_vision.sh; fi
@@ -68,11 +77,10 @@ COPY ./common/install_rocm.sh install_rocm.sh
68
77
RUN bash ./install_rocm.sh
69
78
RUN rm install_rocm.sh
70
79
COPY ./common/install_rocm_magma.sh install_rocm_magma.sh
71
- RUN bash ./install_rocm_magma.sh ${ROCM_VERSION}
80
+ RUN bash ./install_rocm_magma.sh
72
81
RUN rm install_rocm_magma.sh
73
- COPY ./common/install_amdsmi.sh install_amdsmi.sh
74
- RUN bash ./install_amdsmi.sh
75
- RUN rm install_amdsmi.sh
82
+
83
+ ENV ROCM_PATH /opt/rocm
76
84
ENV PATH /opt/rocm/bin:$PATH
77
85
ENV PATH /opt/rocm/hcc/bin:$PATH
78
86
ENV PATH /opt/rocm/hip/bin:$PATH
0 commit comments