-
Notifications
You must be signed in to change notification settings - Fork 61
/
Dockerfile
61 lines (46 loc) · 1.71 KB
/
Dockerfile
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
57
58
59
60
61
ARG HBMPC_DEPS_DIGEST="46902d869ea881d7b00b72ff6accf2558a5e15849da5fa5cc722b4ff82a507f8"
FROM initc3/honeybadgermpc-deps@sha256:$HBMPC_DEPS_DIGEST AS build-compute-power-sums
COPY apps/asynchromix/cpp/ /usr/src/apps/asynchromix/cpp/
RUN make -C /usr/src/apps/asynchromix/cpp
FROM initc3/honeybadgermpc-deps@sha256:$HBMPC_DEPS_DIGEST AS pre-tests
COPY pairing /usr/src/pairing
RUN pip install -v /usr/src/pairing/
ENV HBMPC_HOME /usr/src/HoneyBadgerMPC
WORKDIR $HBMPC_HOME
COPY --from=build-compute-power-sums /usr/local/bin/compute-power-sums /usr/local/bin/
COPY setup.py .
COPY README.md .
COPY honeybadgermpc/__version__.py honeybadgermpc/
COPY honeybadgermpc/__init__.py honeybadgermpc/
COPY honeybadgermpc/ntl/ honeybadgermpc/ntl/
COPY apps/asynchromix/solver/ apps/asynchromix/solver/
ARG SETUP_EXTRAS="tests,docs"
RUN pip install -e .[$SETUP_EXTRAS]
FROM pre-tests AS tests
COPY . .
# default location for logs, such as benchmark logs
RUN mkdir -p /var/log/hbmpc
FROM tests as pre-dev
WORKDIR /
# solidity
COPY --from=ethereum/solc:0.4.24 /usr/bin/solc /usr/bin/solc
# Bash commands
RUN echo "alias cls=\"clear && printf '\e[3J'\"" >> ~/.bashrc
# Make sh point to bash
# This is being changed since it will avoid any errors in the `launch_mpc.sh` script
# which relies on certain code that doesn't work in container's default shell.
RUN ln -sf bash /bin/sh
# Install Nodejs
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash
# If you're testing out apt dependencies, put them here
RUN apt-get install -y --no-install-recommends \
nodejs \
npm \
tmux \
vim
RUN npm install -g ganache-cli
# Install remaining pip dependencies here
WORKDIR $HBMPC_HOME
RUN pip install -e .['dev']
FROM pre-dev as dev
COPY . .