Skip to content

Commit

Permalink
Improve OV short version generation and link so files directly
Browse files Browse the repository at this point in the history
  • Loading branch information
kthui committed Jul 6, 2023
1 parent 8d56eb9 commit 4d7e46a
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions tools/gen_ort_dockerfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,19 +310,17 @@ def dockerfile_for_linux(output_file):
/opt/onnxruntime/lib && \
cp /usr/lib/x86_64-linux-gnu/libpugixml.so.1 /opt/onnxruntime/lib
RUN OV_SHORT_VERSION=`echo ${ONNXRUNTIME_OPENVINO_VERSION} | awk '{print substr($0,3,2)}'` && \
OV_SHORT_VERSION=${OV_SHORT_VERSION}`echo ${ONNXRUNTIME_OPENVINO_VERSION} | awk '{print substr($0,6,1)}'` && \
OV_SHORT_VERSION=${OV_SHORT_VERSION}`echo ${ONNXRUNTIME_OPENVINO_VERSION} | awk '{print substr($0,8,1)}'` && \
RUN OV_SHORT_VERSION=`echo ${ONNXRUNTIME_OPENVINO_VERSION} | awk '{ split($0,a,"."); print substr(a[1],3) a[2] a[3] }'` && \
(cd /opt/onnxruntime/lib && \
chmod a-x * && \
ln -s libopenvino.so.${ONNXRUNTIME_OPENVINO_VERSION} libopenvino.so.${OV_SHORT_VERSION} && \
ln -s libopenvino.so.${OV_SHORT_VERSION} libopenvino.so && \
ln -s libopenvino.so.${ONNXRUNTIME_OPENVINO_VERSION} libopenvino.so && \
ln -s libopenvino_c.so.${ONNXRUNTIME_OPENVINO_VERSION} libopenvino_c.so.${OV_SHORT_VERSION} && \
ln -s libopenvino_c.so.${OV_SHORT_VERSION} libopenvino_c.so && \
ln -s libopenvino_c.so.${ONNXRUNTIME_OPENVINO_VERSION} libopenvino_c.so && \
ln -s libopenvino_ir_frontend.so.${ONNXRUNTIME_OPENVINO_VERSION} libopenvino_ir_frontend.so.${OV_SHORT_VERSION} && \
ln -s libopenvino_ir_frontend.so.${OV_SHORT_VERSION} libopenvino_ir_frontend.so && \
ln -s libopenvino_ir_frontend.so.${ONNXRUNTIME_OPENVINO_VERSION} libopenvino_ir_frontend.so && \
ln -s libopenvino_onnx_frontend.so.${ONNXRUNTIME_OPENVINO_VERSION} libopenvino_onnx_frontend.so.${OV_SHORT_VERSION} && \
ln -s libopenvino_onnx_frontend.so.${OV_SHORT_VERSION} libopenvino_onnx_frontend.so)
ln -s libopenvino_onnx_frontend.so.${ONNXRUNTIME_OPENVINO_VERSION} libopenvino_onnx_frontend.so)
'''

df += '''
Expand Down

0 comments on commit 4d7e46a

Please sign in to comment.