-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-Base
56 lines (50 loc) · 1.31 KB
/
Dockerfile-Base
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
FROM reg.aichallenge.ir/python:3.8
SHELL ["/bin/bash", "-c"]
RUN apt-get update && apt-get install -y \
git \
build-essential \
autoconf \
libtool \
pkg-config \
cmake \
vim
# Install yaml-cpp
RUN git clone https://github.com/jbeder/yaml-cpp.git --branch yaml-cpp-0.6.0 \
&& cd yaml-cpp \
&& mkdir build \
&& cd build \
&& cmake .. \
&& make install
# Install protobuf
RUN git clone --recurse-submodules -b v1.45.0 --depth 1 --shallow-submodules https://github.com/grpc/grpc \
&& cd grpc/third_party/protobuf \
&& ./autogen.sh \
&& ./configure \
&& make -j $(( $(nproc) - 1 )) \
&& make install \
&& ldconfig
# Install gRPC
RUN export MY_INSTALL_DIR=$HOME/.local \
&& mkdir -p $MY_INSTALL_DIR \
&& export PATH=$MY_INSTALL_DIR/bin:$PATH \
&& cd grpc \
&& mkdir -p cmake/build \
&& pushd cmake/build \
&& cmake -DgRPC_INSTALL=ON \
-DgRPC_BUILD_TESTS=OFF \
-DCMAKE_INSTALL_PREFIX=$MY_INSTALL_DIR \
../.. \
&& make -j $(( $(nproc) - 1 )) \
&& make install \
&& popd
# Clean up
RUN rm -rf yaml-cpp \
&& rm -rf grpc \
&& apt-get remove -y \
git \
build-essential \
autoconf \
libtool \
pkg-config \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*