1
- ARG BASEIMAGE=amd64/almalinux:8
2
- ARG POLICY=manylinux_2_28
3
- ARG PLATFORM=x86_64
4
- ARG DEVTOOLSET_ROOTPATH=/opt/rh/gcc-toolset-12/root
5
- ARG LD_LIBRARY_PATH_ARG=${DEVTOOLSET_ROOTPATH}/usr/lib64:${DEVTOOLSET_ROOTPATH}/usr/lib:${DEVTOOLSET_ROOTPATH}/usr/lib64/dyninst:${DEVTOOLSET_ROOTPATH}/usr/lib/dyninst:/usr/local/lib64
6
- ARG PREPEND_PATH=${DEVTOOLSET_ROOTPATH}/usr/bin:
7
-
8
- FROM $BASEIMAGE AS base_image
1
+ FROM onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cpu_x64_ubi8_gcc14:20250124.1
9
2
ARG ROCM_VERSION=6.2.3
10
3
11
4
#Add our own dependencies
@@ -15,170 +8,6 @@ RUN /tmp/scripts/setup_rocm_yum_repo.sh -r ${ROCM_VERSION}
15
8
# Set ENV
16
9
ENV PATH=/opt/rocm/hcc/bin:/opt/rocm/hip/bin:/opt/rocm/bin${PATH:+:${PATH}}
17
10
18
- #Build manylinux2014 docker image begin
19
- FROM base_image AS runtime_base
20
- ARG POLICY
21
- ARG PLATFORM
22
- ARG DEVTOOLSET_ROOTPATH
23
- ARG LD_LIBRARY_PATH_ARG
24
- ARG PREPEND_PATH
25
- LABEL maintainer="The ManyLinux project"
26
-
27
- # TODO: This should not be required if the hipify-perl binary is already a part
28
- # of the base docker image. Remove this line moving forward.
29
- RUN yum install -y hipify-clang
30
-
31
- RUN yum -y install wget
32
-
33
- # rocm lib
34
- RUN yum install -y migraphx-devel
35
-
36
- ENV AUDITWHEEL_POLICY=${POLICY} AUDITWHEEL_ARCH=${PLATFORM} AUDITWHEEL_PLAT=${POLICY}_${PLATFORM}
37
- ENV LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8
38
- ENV DEVTOOLSET_ROOTPATH=${DEVTOOLSET_ROOTPATH}
39
- ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH_ARG}
40
- ENV PATH=${PREPEND_PATH}${PATH}
41
- ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
42
-
43
- # first copy the fixup mirrors script, keep the script around
44
- COPY build_scripts/fixup-mirrors.sh /usr/local/sbin/fixup-mirrors
45
-
46
- # setup entrypoint, this will wrap commands with `linux32` with i686 images
47
- COPY build_scripts/install-entrypoint.sh \
48
- build_scripts/build_utils.sh \
49
- /build_scripts/
50
-
51
- RUN /build_scripts/install-entrypoint.sh && rm -rf /build_scripts
52
- COPY manylinux-entrypoint /usr/local/bin/manylinux-entrypoint
53
- ENTRYPOINT ["manylinux-entrypoint"]
54
-
55
- COPY build_scripts/install-runtime-packages.sh \
56
- build_scripts/build_utils.sh \
57
- /build_scripts/
58
- RUN manylinux-entrypoint /build_scripts/install-runtime-packages.sh && rm -rf /build_scripts/
59
-
60
- COPY build_scripts/build_utils.sh /build_scripts/
61
-
62
- COPY build_scripts/install-autoconf.sh /build_scripts/
63
- RUN export AUTOCONF_ROOT=autoconf-2.71 && \
64
- export AUTOCONF_HASH=431075ad0bf529ef13cb41e9042c542381103e80015686222b8a9d4abef42a1c && \
65
- export AUTOCONF_DOWNLOAD_URL=http://ftp.gnu.org/gnu/autoconf && \
66
- manylinux-entrypoint /build_scripts/install-autoconf.sh
67
-
68
- COPY build_scripts/install-automake.sh /build_scripts/
69
- RUN export AUTOMAKE_ROOT=automake-1.16.5 && \
70
- export AUTOMAKE_HASH=07bd24ad08a64bc17250ce09ec56e921d6343903943e99ccf63bbf0705e34605 && \
71
- export AUTOMAKE_DOWNLOAD_URL=http://ftp.gnu.org/gnu/automake && \
72
- manylinux-entrypoint /build_scripts/install-automake.sh
73
-
74
- COPY build_scripts/install-libtool.sh /build_scripts/
75
- RUN export LIBTOOL_ROOT=libtool-2.4.7 && \
76
- export LIBTOOL_HASH=04e96c2404ea70c590c546eba4202a4e12722c640016c12b9b2f1ce3d481e9a8 && \
77
- export LIBTOOL_DOWNLOAD_URL=http://ftp.gnu.org/gnu/libtool && \
78
- manylinux-entrypoint /build_scripts/install-libtool.sh
79
-
80
- COPY build_scripts/install-libxcrypt.sh /build_scripts/
81
- RUN export LIBXCRYPT_VERSION=4.4.28 && \
82
- export LIBXCRYPT_HASH=db7e37901969cb1d1e8020cb73a991ef81e48e31ea5b76a101862c806426b457 && \
83
- export LIBXCRYPT_DOWNLOAD_URL=https://github.com/besser82/libxcrypt/archive && \
84
- export PERL_ROOT=perl-5.34.0 && \
85
- export PERL_HASH=551efc818b968b05216024fb0b727ef2ad4c100f8cb6b43fab615fa78ae5be9a && \
86
- export PERL_DOWNLOAD_URL=https://www.cpan.org/src/5.0 && \
87
- manylinux-entrypoint /build_scripts/install-libxcrypt.sh
88
-
89
-
90
- FROM runtime_base AS build_base
91
- COPY build_scripts/install-build-packages.sh /build_scripts/
92
- RUN manylinux-entrypoint /build_scripts/install-build-packages.sh
93
-
94
-
95
- FROM build_base AS build_git
96
- COPY build_scripts/build-git.sh /build_scripts/
97
- RUN export GIT_ROOT=git-2.36.2 && \
98
- export GIT_HASH=6dc2cdea5fb23d823ba4871cc23222c1db31dfbb6d6c6ff74c4128700df57c68 && \
99
- export GIT_DOWNLOAD_URL=https://www.kernel.org/pub/software/scm/git && \
100
- manylinux-entrypoint /build_scripts/build-git.sh
101
-
102
-
103
- FROM build_base AS build_cpython
104
- COPY build_scripts/build-sqlite3.sh /build_scripts/
105
- RUN export SQLITE_AUTOCONF_ROOT=sqlite-autoconf-3390200 && \
106
- export SQLITE_AUTOCONF_HASH=852be8a6183a17ba47cee0bbff7400b7aa5affd283bf3beefc34fcd088a239de && \
107
- export SQLITE_AUTOCONF_DOWNLOAD_URL=https://www.sqlite.org/2022 && \
108
- manylinux-entrypoint /build_scripts/build-sqlite3.sh
109
-
110
- COPY build_scripts/build-openssl.sh /build_scripts/
111
- RUN export OPENSSL_ROOT=openssl-1.1.1q && \
112
- export OPENSSL_HASH=d7939ce614029cdff0b6c20f0e2e5703158a489a72b2507b8bd51bf8c8fd10ca && \
113
- export OPENSSL_DOWNLOAD_URL=https://www.openssl.org/source && \
114
- manylinux-entrypoint /build_scripts/build-openssl.sh
115
-
116
- COPY build_scripts/build-cpython.sh /build_scripts/
117
-
118
-
119
- FROM build_cpython AS build_cpython38
120
- COPY build_scripts/ambv-pubkey.txt /build_scripts/cpython-pubkeys.txt
121
- RUN manylinux-entrypoint /build_scripts/build-cpython.sh 3.8.13
122
-
123
-
124
- FROM build_cpython AS build_cpython39
125
- COPY build_scripts/ambv-pubkey.txt /build_scripts/cpython-pubkeys.txt
126
- RUN manylinux-entrypoint /build_scripts/build-cpython.sh 3.9.13
127
-
128
-
129
- FROM build_cpython AS build_cpython310
130
- COPY build_scripts/cpython-pubkey-310-311.txt /build_scripts/cpython-pubkeys.txt
131
- RUN manylinux-entrypoint /build_scripts/build-cpython.sh 3.10.5
132
-
133
-
134
- FROM build_cpython AS build_cpython311
135
- COPY build_scripts/cpython-pubkey-310-311.txt /build_scripts/cpython-pubkeys.txt
136
- RUN manylinux-entrypoint /build_scripts/build-cpython.sh 3.11.2
137
-
138
- FROM build_cpython AS build_cpython312
139
- COPY build_scripts/cpython-pubkey-312-313.txt /build_scripts/cpython-pubkeys.txt
140
- RUN manylinux-entrypoint /build_scripts/build-cpython.sh 3.12.1
141
-
142
-
143
- FROM build_cpython AS all_python
144
- COPY build_scripts/install-pypy.sh \
145
- build_scripts/pypy.sha256 \
146
- build_scripts/finalize-python.sh \
147
- /build_scripts/
148
- RUN manylinux-entrypoint /build_scripts/install-pypy.sh 3.8 7.3.9
149
- RUN manylinux-entrypoint /build_scripts/install-pypy.sh 3.9 7.3.9
150
- COPY --from=build_cpython38 /opt/_internal /opt/_internal/
151
- COPY --from=build_cpython39 /opt/_internal /opt/_internal/
152
- COPY --from=build_cpython310 /opt/_internal /opt/_internal/
153
- COPY --from=build_cpython311 /opt/_internal /opt/_internal/
154
- COPY --from=build_cpython312 /opt/_internal /opt/_internal/
155
- RUN manylinux-entrypoint /build_scripts/finalize-python.sh
156
-
157
-
158
- FROM runtime_base
159
- COPY --from=build_git /manylinux-rootfs /
160
- COPY --from=build_cpython /manylinux-rootfs /
161
- COPY --from=all_python /opt/_internal /opt/_internal/
162
- COPY build_scripts/finalize.sh \
163
- build_scripts/python-tag-abi-tag.py \
164
- build_scripts/requirements3.8.txt \
165
- build_scripts/requirements3.9.txt \
166
- build_scripts/requirements3.10.txt \
167
- build_scripts/requirements3.11.txt \
168
- build_scripts/requirements3.12.txt \
169
- build_scripts/requirements-base-tools.txt \
170
- /build_scripts/
171
- COPY build_scripts/requirements-tools/* /build_scripts/requirements-tools/
172
- RUN manylinux-entrypoint /build_scripts/finalize.sh && rm -rf /build_scripts
173
-
174
- ENV SSL_CERT_FILE=/opt/_internal/certs.pem
175
-
176
- CMD ["/bin/bash"]
177
-
178
- #Build manylinux2014 docker image end
179
-
180
- ARG PYTHON_VERSION=3.8
181
- ARG OPSET_VERSION=17
182
11
ARG INSTALL_DEPS_EXTRA_ARGS
183
12
184
13
@@ -188,18 +17,10 @@ RUN cd /tmp/scripts && \
188
17
/tmp/scripts/install_python_deps.sh -d gpu -p 3.10 $INSTALL_DEPS_EXTRA_ARGS && \
189
18
rm -rf /tmp/scripts
190
19
191
-
192
- # Install ccache to reuse this dockerfile for CI
193
- RUN mkdir -p /tmp/ccache && \
194
- cd /tmp/ccache && \
195
- wget -q -O - https://github.com/ccache/ccache/releases/download/v4.7.4/ccache-4.7.4-linux-x86_64.tar.xz | tar --strip 1 -J -xf - && \
196
- cp /tmp/ccache/ccache /usr/bin && \
197
- rm -rf /tmp/ccache
198
-
199
20
ARG BUILD_UID=1001
200
21
ARG BUILD_USER=onnxruntimedev
201
22
RUN adduser --uid $BUILD_UID $BUILD_USER
202
23
WORKDIR /home/$BUILD_USER
203
24
USER $BUILD_USER
204
25
ENV PATH=/usr/local/dotnet:$PATH
205
- ENV ORTMODULE_ONNX_OPSET_VERSION=$OPSET_VERSION
26
+
0 commit comments