forked from simbricks/simbricks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.buildenv
79 lines (78 loc) · 1.72 KB
/
Dockerfile.buildenv
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
ARG REGISTRY=
ARG TAG=:latest
FROM ubuntu:jammy
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive \
TZ=Europe/Berlin \
apt-get install -y \
apt-utils \
autoconf \
bc \
bison \
build-essential \
cmake \
doxygen \
g++ \
flex \
git \
kmod \
libboost-coroutine-dev \
libboost-fiber-dev \
libboost-iostreams-dev \
libboost-program-options-dev \
libelf-dev \
libglib2.0-dev \
libgmp-dev \
libgoogle-perftools-dev \
libnanomsg-dev \
libpcap-dev \
libpixman-1-dev \
libprotobuf-dev \
libssl-dev \
libtool \
locales \
ninja-build \
protobuf-compiler \
python-is-python3 \
python3-dev \
python3-pip \
rsync \
scons \
sudo \
unzip \
wget \
nano \
vim \
&& locale-gen en_US.UTF-8 \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt /tmp/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /tmp/requirements.txt
COPY verilator.patch /tmp/
RUN cd /tmp \
&& git clone -b v4.010 https://github.com/verilator/verilator \
&& cd verilator \
&& patch -p1 < /tmp/verilator.patch \
&& autoupdate \
&& autoconf \
&& ./configure \
&& make -j`nproc` \
&& make install \
&& rm -rf /tmp/verilator
RUN cd /tmp \
&& git clone https://github.com/apache/thrift.git \
&& cd thrift \
&& ./bootstrap.sh \
&& ./configure \
&& make -j`nproc` \
&& make install \
&& ldconfig \
&& rm -rf /tmp/thrift
# Add non-root user for vs code devcontainer.
ARG USERNAME=simbricks
ARG USER_UID=1000
ARG USER_GID=$USER_UID
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME --shell /bin/bash \
# Add sudo support for this user and remove the need to type in password.
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME