Skip to content

Commit ed2d441

Browse files
authored
Update ORT server build pipeline (microsoft#7030)
1. Migrated it to Ed's new docker build script 2. Use python 3.6 instead, because it is the default one in ubuntu 18.04 3. Move the "pip install" command to the docker image build stage(instead of when running the image)
1 parent 2e38bf5 commit ed2d441

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

Diff for: server/ci/run.sh

-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,4 @@ make -j$(getconf _NPROCESSORS_ONLN)
77
cd /onnxruntime_src/test
88
/build/onnxruntime_server_tests
99
cd /build
10-
python3 -m pip install grpcio==1.27.2 requests protobuf
1110
python3 server_test/test_main.py /build/onnxruntime_server /build/models/opset8/test_mnist /onnxruntime_src/test/testdata/server /build /build/server_test

Diff for: tools/ci_build/github/azure-pipelines/linux-ort-srv-ci-pipeline.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ jobs:
1313
continueOnError: true
1414
condition: always()
1515

16-
- task: CmdLine@2
17-
displayName: 'Build docker image'
18-
inputs:
19-
script: docker build --pull -t onnxruntime-server-ubuntu18.04 --build-arg BUILD_USER=onnxruntimedev --build-arg BUILD_UID=$(id -u) --build-arg OS_VERSION=18.04 --build-arg PYTHON_VERSION=3.5 -f Dockerfile.ubuntu_server .
20-
workingDirectory: $(Build.SourcesDirectory)/tools/ci_build/github/linux/docker
16+
- template: templates/get-docker-image-steps.yml
17+
parameters:
18+
Dockerfile: tools/ci_build/github/linux/docker/Dockerfile.ubuntu_server
19+
Context: tools/ci_build/github/linux/docker
20+
DockerBuildArgs: "--build-arg BUILD_USER=onnxruntimedev --build-arg BUILD_UID=$(id -u) --build-arg OS_VERSION=18.04 --build-arg PYTHON_VERSION=3.6"
21+
Repository: onnxruntime-server-ubuntu18.04
2122

2223
- task: CmdLine@2
2324
displayName: 'Run docker image'

Diff for: tools/ci_build/github/linux/docker/Dockerfile.ubuntu_server

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
ARG OS_VERSION=16.04
1+
ARG OS_VERSION=18.04
22
FROM ubuntu:${OS_VERSION}
33

4-
ARG PYTHON_VERSION=3.5
4+
ARG PYTHON_VERSION=3.6
55

66
ADD scripts /tmp/scripts
77
RUN /tmp/scripts/install_ubuntu.sh -p $PYTHON_VERSION && /tmp/scripts/install_server_deps.sh && rm -rf /tmp/scripts
88

99
WORKDIR /root
1010

11-
ENV LD_LIBRARY_PATH /usr/local/openblas/lib:$LD_LIBRARY_PATH
1211
ENV PATH /usr/local/go/bin:$PATH
1312

1413
ARG BUILD_UID=1000

Diff for: tools/ci_build/github/linux/docker/scripts/install_server_deps.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ if [ $SYS_LONG_BIT = "64" ]; then
1818
tar -zxf cmake-3.18.1-Linux-x86_64.tar.gz --strip=1 -C /usr
1919

2020
echo "Installing onnxruntime"
21-
aria2c https://github.com/microsoft/onnxruntime/releases/download/v1.4.0/onnxruntime-linux-x64-1.4.0.tgz
22-
tar -zxf onnxruntime-linux-x64-1.4.0.tgz --strip=1
21+
aria2c https://github.com/microsoft/onnxruntime/releases/download/v1.7.0/onnxruntime-linux-x64-1.7.0.tgz
22+
tar -zxf onnxruntime-linux-x64-1.7.0.tgz --strip=1
2323
cp -r include/* /usr/include
2424
cp -r lib/* /usr/lib
2525
ldconfig /usr/lib
@@ -76,3 +76,5 @@ make -j$(getconf _NPROCESSORS_ONLN)
7676
make install
7777
cd /tmp
7878
rm -rf /tmp/grpc
79+
80+
python3 -m pip install grpcio==1.27.2 requests protobuf

0 commit comments

Comments
 (0)