-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
107 lines (91 loc) · 3.39 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
FROM ubuntu:22.04
# set a directory for the app
WORKDIR /usr/src/soid/
# copy
COPY . .
# install ubuntu dependencies
RUN DEBIAN_FRONTEND=noninteractive \
apt-get update \
&& apt-get install -y build-essential \
wget \
curl \
libcap-dev \
git \
cmake \
libncurses5-dev \
python2-minimal \
unzip \
libtcmalloc-minimal4 \
libgoogle-perftools-dev \
libsqlite3-dev \
doxygen \
python3 \
python3-pip \
python3-dev \
virtualenv \
gcc-multilib \
g++-multilib \
z3 \
clang-11 \
llvm-11 \
llvm-11-dev \
llvm-11-tools \
m4 \
bison \
flex \
bc \
libboost-dev \
unzip \
libtool \
freeglut3-dev \
libglib2.0-0 \
libsm6 \
libxrender1 \
libxext6 \
libgl1-mesa-glx \
ffmpeg \
npm \
xvfb \
mesa-utils \
gfortran \
libopenblas-dev \
pkg-config \
libopenblas64-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# expose ports
# soid frontend
EXPOSE 3000
# soid backend
EXPOSE 5001
# Install miniconda
ENV CONDA_DIR /opt/conda
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \
/bin/bash ~/miniconda.sh -b -p /opt/conda
# Put conda in path so we can use conda activate
ENV PATH=$CONDA_DIR/bin:$PATH
# link to prebuilt libcxx
RUN mkdir /usr/src/soid/deps/build
RUN ln -s /usr/src/soid/deps/prebuilt/libc++ /usr/src/soid/deps/build/libc++
# link to prebuilt klee-uclibc
RUN ln -s /usr/src/soid/deps/prebuilt/klee-uclibc /usr/src/soid/deps/klee-uclibc
# link to prebuilt klee
RUN ln -s /usr/src/soid/deps/prebuilt/klee /usr/src/soid/deps/klee
# link to prebuilt llvm-project
RUN ln -s /usr/src/soid/deps/prebuilt/llvm-project /usr/src/soid/deps/llvm-project
# link to prebuilt klee-uclibc-3
RUN ln -s /usr/src/soid/deps/prebuilt/klee-uclibc-3 /usr/src/soid/deps/klee-uclibc-3
# link to prebuilt klee-float
RUN ln -s /usr/src/soid/deps/prebuilt/klee-float /usr/src/soid/deps/klee-float
# install python dependencies
RUN pip install pyglet==1.5.15 \
pip install numpy==1.26.0 \
pip install --no-cache-dir -r /usr/src/soid/requirements.txt
# install soid
RUN pip install -e .
# prep duckietown-soid
RUN mv /usr/src/soid/examples/gui/prep /usr/src/soid/examples/gui/duckietown-soid/prep
RUN mv /usr/src/soid/examples/gui/launch /usr/src/soid/examples/gui/duckietown-soid/launch
RUN mv /usr/src/soid/examples/gui/benchmarks/runner /usr/src/soid/examples/gui/duckietown-soid/runner
RUN mv /usr/src/soid/examples/gui/benchmarks/run_tests.py /usr/src/soid/examples/gui/duckietown-soid/run_tests.py
RUN /usr/src/soid/examples/gui/duckietown-soid/prep