github.com/alwaysproblem/mlserving-tutorial@v0.0.0-20221124033215-121cfddbfbf4/TFserving/ClientAPI/cpp/cmake/grpc-cpp.dockerfile (about) 1 FROM ubuntu:18.04 2 3 RUN apt-get update \ 4 && apt-get install software-properties-common -y \ 5 && apt-get install autoconf automake libtool curl make g++4.9 unzip -y \ 6 && apt-get install pkg-config libgflags-dev build-essential cmake clang-5.0 libc++-dev -y \ 7 && apt-get install doxygen git libboost-all-dev -y \ 8 && apt-get clean 9 # && apt-get install protobuf-compiler-grpc libprotobuf-dev -y \ 10 11 # sudo apt install curl gnupg 12 # curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add - 13 # echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list 14 # sudo apt update && sudo apt install bazel 15 16 # install protobuf C++ 17 RUN cd / \ 18 && git clone https://github.com/google/protobuf \ 19 && cd protobuf \ 20 && git submodule update --init --recursive \ 21 && ./autogen.sh \ 22 && ./configure \ 23 && make \ 24 && make check \ 25 && make install \ 26 && ldconfig \ 27 && cd .. 28 29 # install grpc 30 RUN cd / \ 31 && git clone -b $(curl -L https://grpc.io/release) https://github.com/grpc/grpc \ 32 && cd grpc \ 33 && git submodule update --init \ 34 && mkdir -p cmake/build \ 35 && cd cmake/build \ 36 && cmake ../.. -DBUILD_SHARED_LIBS=ON \ 37 && make \ 38 && make install \ 39 && cd / 40 41 # add env 42 ENV PATH=$PATH:/grpc/cmake/build/ 43 ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/:/grpc/cmake/build/