Skip to content

Commit 56651ec

Browse files
committed
Merge iwth Haim change
2 parents 1b6ba6c + bf5678e commit 56651ec

File tree

3 files changed

+31
-36
lines changed

3 files changed

+31
-36
lines changed

opt/build/onnxruntime/Dockerfile.x64

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,11 @@ ARG ONNXRUNTIME_VER=1.6.0
1010
ARG ARCH=x64
1111

1212
RUN apt-get -qq update
13-
RUN apt-get -qq install -y curl wget tar git
14-
RUN apt-get -qq install -y build-essential cmake
15-
RUN apt-get -qq install -y libcurl4-openssl-dev libssl-dev libatlas-base-dev zlib1g-dev
16-
17-
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
1817
RUN pip3 install --upgrade pip setuptools wheel
19-
# RUN pip3 install numpy
20-
RUN apt-get -q install -y python3-numpy
2118

2219
ENV LANG=en_US.UTF-8
2320
RUN apt-get install -y locales && \
@@ -27,15 +24,17 @@ RUN apt-get install -y locales && \
2724

2825
WORKDIR /build
2926

30-
ADD ./pack.sh /build/
31-
ARG BUILDTYPE=Debug
27+
ARG BUILDTYPE=RelWithDebInfo
28+
3229
ARG BUILDARGS="--config ${BUILDTYPE} --parallel"
3330

34-
RUN git clone --single-branch --branch rel-${ONNXRUNTIME_VER} --recursive ${ONNXRUNTIME_REPO} onnxruntime
35-
36-
RUN cd onnxruntime ;\
37-
./build.sh ${BUILDARGS} --update --build ;\
38-
./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
3936
# RUN ./build.sh ${BUILDARGS} --enable_pybind --build_wheel
4037

38+
ADD ./pack.sh /build
39+
WORKDIR /build
4140
RUN ./pack.sh ${ONNXRUNTIME_VER} ${ARCH}

opt/build/onnxruntime/Dockerfile.x64-gpu

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,18 @@ ARG ONNXRUNTIME_VER=1.6.0
88
ARG ARCH=x64-gpu
99

1010
RUN apt-get -qq update
11-
RUN apt-get -qq install -y curl wget tar git
12-
RUN apt-get -qq install -y build-essential
13-
RUN apt-get -qq install -y libcurl4-openssl-dev libssl-dev libatlas-base-dev zlib1g-dev
11+
RUN apt-get -qq install -y curl \
12+
wget tar git build-essential \
13+
libcurl4-openssl-dev libssl-dev \
14+
libatlas-base-dev zlib1g-dev python3 python3-pip \
15+
python3-dev python3-numpy rsync
1416

15-
RUN apt-get -qq install -y python3 python3-pip python3-dev
1617
RUN pip3 install --upgrade pip setuptools wheel
17-
# RUN pip3 install numpy
18-
RUN apt-get -q install -y python3-numpy
19-
RUN apt-get install -y snapd
20-
RUN wget https://github.com/Kitware/CMake/releases/download/v3.15.2/cmake-3.15.2.tar.gz; \
21-
tar -zxvf cmake-3.15.2.tar.gz; \
22-
cd cmake-3.15.2; \
23-
./bootstrap; \
24-
make -j4; \
25-
make install
18+
19+
RUN wget -q https://github.com/Kitware/CMake/releases/download/v3.19.5/cmake-3.19.5-Linux-x86_64.tar.gz -O /tmp/cmake.tgz
20+
WORKDIR /tmp
21+
RUN tar -xpf cmake.tgz
22+
RUN rsync -aqH cmake*/* /usr
2623

2724

2825
ENV LANG=en_US.UTF-8
@@ -33,15 +30,14 @@ RUN apt-get install -y locales && \
3330

3431
WORKDIR /build
3532

36-
ADD ./pack.sh /build/
3733
ARG BUILDTYPE=MinSizeRel
3834
ARG BUILDARGS="--config ${BUILDTYPE} --parallel"
3935

40-
RUN git clone --single-branch --branch rel-${ONNXRUNTIME_VER} --recursive ${ONNXRUNTIME_REPO} onnxruntime
41-
36+
RUN git clone --single-branch --branch rel-${ONNXRUNTIME_VER} ${ONNXRUNTIME_REPO} onnxruntime
37+
WORKDIR /build/onnxruntime
38+
RUN git fetch --recurse-submodules -j4
39+
RUN ./build.sh ${BUILDARGS} --update --build --use_cuda --cudnn_home /usr/local/cuda --cuda_home /usr/local/cuda --build_shared_lib --parallel
4240

43-
RUN cd onnxruntime ;\
44-
./build.sh ${BUILDARGS} --update --build --use_cuda --cudnn_home /usr/local/cuda --cuda_home /usr/local/cuda --build_shared_lib --parallel
45-
# RUN ./build.sh ${BUILDARGS} --enable_pybind --build_wheel
46-
47-
RUN ./pack.sh ${ONNXRUNTIME_VER} ${ARCH}
41+
ADD ./pack.sh /build/
42+
WORKDIR /build
43+
RUN /pack.sh ${ONNXRUNTIME_VER} ${ARCH}

src/backends/onnxruntime.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ RAI_Model *RAI_ModelCreateORT(RAI_Backend backend, const char *devicestr, RAI_Mo
329329
}
330330

331331
// TODO: these options could be configured at the AI.CONFIG level
332-
//ONNX_VALIDATE_STATUS(ort->SetSessionGraphOptimizationLevel(session_options, 1))
332+
// ONNX_VALIDATE_STATUS(ort->SetSessionGraphOptimizationLevel(session_options, 1))
333333
ONNX_VALIDATE_STATUS(
334334
ort->SetIntraOpNumThreads(session_options, (int)opts.backends_intra_op_parallelism))
335335
ONNX_VALIDATE_STATUS(

0 commit comments

Comments
 (0)