forked from primihub/primihub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.release
38 lines (28 loc) · 1.1 KB
/
Dockerfile.release
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
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
# Install python3 and GCC openmp (Depends with cryptFlow2 library)
RUN apt-get update \
&& apt-get install -y python3 python3-dev libgmp-dev python3-pip tzdata libmysqlclient-dev \
&& ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY primihub-linux-amd64.tar.gz primihub-linux-arm64.tar.gz /opt/
COPY example ./example
COPY data/ /tmp/
COPY config/ ./config
COPY python/ ./python
COPY src/primihub/protos/ src/primihub/protos/
RUN ARCH=`arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/` \
&& tar zxf /opt/primihub-linux-${ARCH}.tar.gz \
&& mkdir log \
&& mv bazel-bin/src/primihub/pybind_warpper/opt_paillier_c2py.so python/ \
&& mv bazel-bin/src/primihub/pybind_warpper/linkcontext.so python/ \
&& ln -s bazel-bin/node primihub-node && ln -s bazel-bin/cli primihub-cli
WORKDIR /app/python
RUN python3 -m pip install --upgrade pip \
&& python3 -m pip install -r requirements.txt \
&& python3 setup.py install \
&& rm -rf /root/.cache/pip/
WORKDIR /app
# gRPC server port
EXPOSE 50050