-
Notifications
You must be signed in to change notification settings - Fork 45
/
DockerfileDev
57 lines (44 loc) · 1.75 KB
/
DockerfileDev
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
# Install Ubuntu image from docker hub.
FROM ubuntu:jammy as ubuntu
# Assign simple root password.
RUN echo "root:root" | chpasswd
# Set environmental variables.
ENV PROJECT_HOME=/projectmetis-rc
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Minsk
# Simple update.
RUN apt -y update
# Install helper packages and bazelisk (i.e., bazel versioning resolution tool at runtime).
RUN apt -y install nano wget git
RUN wget https://github.com/bazelbuild/bazelisk/releases/download/v1.12.0/bazelisk-linux-amd64
RUN chmod +x ./bazelisk-linux-amd64
RUN mv ./bazelisk-linux-amd64 /usr/bin/bazel
# Install and setup gcc-10, g++-10.
RUN apt -y install build-essential gcc-10 g++-10
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 1
RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 1
# Install Palisades dependencies.
RUN apt -y install autoconf libomp-dev
# Install Paillier dependencies.
RUN apt -y install libgmp3-dev
# Install and setup python3.8.
RUN apt -y install software-properties-common
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt -y update
RUN apt -y install -f python3.8-dev
RUN apt -y install python3.8-distutils
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.8 1
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1
# Setup SSH.
RUN apt -y install openssh-server
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config
# Clean up.
RUN apt-get clean
# MetisFL configuration.
WORKDIR /projectmetis-rc
COPY . .
# Build all bazel targets.
#RUN bazel query //... | xargs bazel build
RUN bazel build //projectmetis/python/driver:initialize_controller
RUN bazel build //projectmetis/python/driver:initialize_learner
ENTRYPOINT service ssh start && bash