@@ -8,21 +8,18 @@ ARG ONNXRUNTIME_VER=1.6.0
88ARG ARCH=x64-gpu
99
1010RUN 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
1617RUN 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
2825ENV LANG=en_US.UTF-8
@@ -33,15 +30,14 @@ RUN apt-get install -y locales && \
3330
3431WORKDIR /build
3532
36- ADD ./pack.sh /build/
3733ARG BUILDTYPE=MinSizeRel
3834ARG 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}
0 commit comments