forked from primihub/primihub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.release
34 lines (26 loc) · 1.07 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
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 wget 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 src/primihub/protos/ src/primihub/protos/
RUN tar zxf /opt/primihub-linux-$(dpkg --print-architecture).tar.gz \
&& mkdir log
RUN ln -s -f bazel-bin/cli primihub-cli
RUN ln -s -f bazel-bin/node primihub-node
WORKDIR /app/python
RUN python3 -m pip install --upgrade pip \
&& python3 -m pip install -r requirements.txt \
&& if [ "$(dpkg --print-architecture)" = "arm64" ]; then \
wget https://primihub.oss-cn-beijing.aliyuncs.com/dev/tenseal-0.3.14-cp38-cp38-linux_aarch64.whl \
&& pip install tenseal-0.3.14-cp38-cp38-linux_aarch64.whl; \
fi \
&& python3 setup.py install \
&& rm -rf /root/.cache/pip/
WORKDIR /app
# gRPC server port
EXPOSE 50050