github.com/alwaysproblem/mlserving-tutorial@v0.0.0-20221124033215-121cfddbfbf4/TFserving/ClientAPI/cpp/make-static-lib/grpc-cpp-static.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++-6 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  
    10  # install protobuf C++
    11  RUN cd / \
    12      && git clone -b v3.12.4 https://github.com/google/protobuf \
    13      && cd protobuf \
    14      && git submodule update --init --recursive \
    15      && ./autogen.sh \
    16      && ./configure --disable-shared \
    17      && make \
    18      && make check \
    19      && make install \
    20      && ldconfig \
    21      && cd ..
    22  
    23  # install grpc
    24  RUN cd / \
    25      && git clone -b v1.29.1 https://github.com/grpc/grpc \
    26      && cd grpc \
    27      && git submodule update --init \
    28      && mkdir -p cmake/build \
    29      && cd cmake/build \
    30      && cmake ../.. -DgRPC_PROTOBUF_PROVIDER=package \
    31      && make \
    32      && make install \
    33      && cd /
    34  
    35  ENV PATH=$PATH:/grpc/cmake/build/
    36  ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/:/grpc/cmake/build/