-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
55 lines (47 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
FROM devosoft/empirical
USER root
COPY . /opt/evo-algo
RUN \
pip3 install -r /opt/evo-algo/docs/requirements.txt \
&& \
echo "installed documentation build requirements"
RUN \
find /etc/apt -type f -name '*.list' -exec sed -i 's/^# \(deb.*-backports.*\)/\1/; s/^# \(deb.*-updates.*\)/\1/; s/^# \(deb.*-proposed.*\)/\1/; s/^# \(deb.*-security.*\)/\1/' {} + \
&& \
add-apt-repository -y ppa:ubuntu-toolchain-r/test \
&& \
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
&& \
apt-add-repository "deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main" \
&& \
apt-get update -qq \
&& \
apt-get install -y cmake build-essential python-virtualenv python-pip nodejs tar gzip libclang-7-dev llvm-7 llvm-7-dev clang-7 libstdc++-7-dev gdb \
&& \
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-7 90 \
&& \
update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-7 90 \
&& \
update-alternatives --install /usr/bin/llvm-profdata llvm-profdata /usr/bin/llvm-profdata-7 90 \
&& \
update-alternatives --install /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-7 90 \
&& \
echo "installed force cover build dependencies"
# make sure unprivileged user has access to new files in opt
# adapted from https://stackoverflow.com/a/27703359
# and https://superuser.com/a/235398
RUN \
chgrp --recursive user /opt/evo-algo \
&& \
chmod --recursive g+rwx /opt/evo-algo \
&& \
echo "user granted permissions to /opt/evo-algo"
USER user
RUN \
cd /opt/evo-algo \
&& \
make install-test-dependencies \
&& \
echo "installed test dependencies"
# Define default working directory.
WORKDIR /opt/evo-algo