File tree 1 file changed +31
-0
lines changed
1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,37 @@ def dockerfile_for_linux(output_file):
94
94
# The Onnx Runtime dockerfile is the collection of steps in
95
95
# https://github.com/microsoft/onnxruntime/tree/master/dockerfiles
96
96
97
+ """
98
+ # Consider moving rhel logic to its own function e.g., dockerfile_for_rhel
99
+ # if the changes become more substantial.
100
+ if target_platform () == "rhel" :
101
+ df += """
102
+ # The manylinux container defaults to Python 3.7, but some feature installation
103
+ # requires a higher version.
104
+ ARG PYVER=3.10
105
+ ENV PYTHONPATH=/opt/python/v
106
+ RUN ln -sf /opt/python/cp${PYVER/./}* ${PYTHONPATH}
107
+
108
+ ENV PYBIN=${PYTHONPATH}/bin
109
+ ENV PYTHON_BIN_PATH=${PYBIN}/python${PYVER} \
110
+ PATH=${PYBIN}:${PATH}
111
+
112
+ RUN yum install -y \
113
+ wget \
114
+ zip \
115
+ ca-certificates \
116
+ curl \
117
+ patchelf \
118
+ python3-pip \
119
+ git \
120
+ gnupg \
121
+ gnupg1 \
122
+ openssl-devel
123
+
124
+ """
125
+ else :
126
+ df += """
127
+
97
128
RUN apt-get update && apt-get install -y --no-install-recommends \
98
129
software-properties-common \
99
130
wget \
You can’t perform that action at this time.
0 commit comments