@@ -5,30 +5,36 @@ ARG OS=debian:buster
55#----------------------------------------------------------------------------------------------
66FROM ${OS}
77
8- ARG ONNXRUNTIME_REPO=https://github.com/Microsoft/onnxruntime
9- ARG ONNXRUNTIME_VER=1.0.0
8+ ARG ONNXRUNTIME_REPO=https://github.com/RedisAI/onnxruntime
9+ ARG ONNXRUNTIME_VER=1.6.0
10+ ARG ARCH=x64
1011
1112RUN apt-get -qq update
12- RUN apt-get -qq install -y curl wget tar git
13- RUN apt-get -qq install -y build-essential cmake
14- RUN apt-get -qq install -y libcurl4-openssl-dev libssl-dev libatlas-base-dev zlib1g-dev
15-
16- RUN apt-get -qq install -y python3 python3-pip python3-dev
13+ RUN apt-get -qq install -y curl wget tar git \
14+ build-essential cmake \
15+ libcurl4-openssl-dev libssl-dev libatlas-base-dev zlib1g-dev \
16+ python3 python3-pip python3-dev python3-numpy
1717RUN pip3 install --upgrade pip setuptools wheel
18- # RUN pip3 install numpy
19- RUN apt-get -q install -y python3-numpy
18+
19+ ENV LANG=en_US.UTF-8
20+ RUN apt-get install -y locales && \
21+ sed -i -e "s/# $LANG.*/$LANG UTF-8/" /etc/locale.gen && \
22+ dpkg-reconfigure --frontend=noninteractive locales && \
23+ update-locale LANG=$LANG
2024
2125WORKDIR /build
2226
23- ADD ./pack.sh /build/
24- ARG BUILDTYPE=MinSizeRel
27+ ARG BUILDTYPE=RelWithDebInfo
28+
2529ARG BUILDARGS="--config ${BUILDTYPE} --parallel"
2630
27- RUN git clone --single-branch --branch rel-${ONNXRUNTIME_VER} --recursive ${ONNXRUNTIME_REPO} onnxruntime
28-
29- RUN cd onnxruntime ;\
30- ./build.sh ${BUILDARGS} --update --build ;\
31- ./build.sh ${BUILDARGS} --build_shared_lib
31+ RUN git clone --single-branch --branch rel-${ONNXRUNTIME_VER} ${ONNXRUNTIME_REPO} onnxruntime
32+ WORKDIR /build/onnxruntime
33+ RUN git fetch --recurse-submodules -j4
34+ RUN ./build.sh ${BUILDARGS} --update --build
35+ RUN ./build.sh ${BUILDARGS} --build_shared_lib
3236# RUN ./build.sh ${BUILDARGS} --enable_pybind --build_wheel
3337
34- RUN ./pack.sh ${ONNXRUNTIME_VER}
38+ ADD ./pack.sh /build
39+ WORKDIR /build
40+ RUN ./pack.sh ${ONNXRUNTIME_VER} ${ARCH}
0 commit comments