-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile.ubuntu18_small
76 lines (60 loc) · 2.53 KB
/
Dockerfile.ubuntu18_small
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
FROM ubuntu:18.04
WORKDIR /home
RUN apt-get update -y && apt-get install -y apt-transport-https
RUN apt-get install -y tzdata
RUN apt-get install -y build-essential
# install python, perl, CAD tools and software toolchain dependencies, miscellaneous
RUN apt-get install -y python python-pip python3 python3-pip python3-tk \
perl libyaml-perl libxml-perl \
xterm csh ksh zsh tcl \
build-essential libgl1-mesa-dev libglu1-mesa libgl1-mesa-dri \
libreadline-dev libxpm-dev libmotif-dev libncurses5 libncurses-dev \
libgdbm-dev libsm-dev libxcursor-dev libxft-dev libxrandr-dev \
libxss-dev libmpc-dev libnspr4 libnspr4-dev tk tk-dev flex rename \
zlib1g gcc-multilib device-tree-compiler bison xvfb \
cmake gawk socat minicom tmux sudo cpio rsync net-tools \
git tig wget bzip2 unzip file patch bc x11-apps tig \
texinfo help2man emacs vim
# For older GUIs (e.g. Stratus)
RUN echo 'deb http://security.ubuntu.com/ubuntu xenial-security main' | tee -a /etc/apt/sources.list
RUN apt-get install -y libpng-dev
# QT
RUN apt-get install -y qtcreator
# install Pmw module
RUN pip3 install Pmw
# create a non-root user with sudo privilege (password:espuser)
RUN useradd -ms /bin/bash espuser
RUN usermod -aG sudo espuser
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN echo 'espuser:espuser' | chpasswd
# switch to the non-root user
USER espuser
WORKDIR /home/espuser
ENV HOST=$(hostname)
# clone ESP repository and install software toolchains
RUN git clone https://github.com/sld-columbia/esp.git && cd esp && \
git submodule update --init --recursive \
accelerators/stratus_hls/common/inc \
accelerators/chisel/hw rtl/caches/esp-caches rtl/cores/ariane/ariane \
soft/ariane/riscv-pk soft/ariane/riscv-tests \
accelerators/third-party/NV_NVDLA/ip \
accelerators/third-party/NV_NVDLA/sw && \
cd /home/espuser/esp/accelerators/third-party/NV_NVDLA && \
rm -rf ip/verif sw/prebuilt sw/regression
# copy over some useful environment setup scripts
COPY ./configs/esp_env.sh /home/espuser
COPY ./configs/esp_env_cad.sh /home/espuser
COPY ./configs/bashrc /home/espuser/.bashrc
COPY ./configs/tmux.conf /home/espuser/.tmux.conf
COPY ./configs/emacs /home/espuser/.emacs
COPY ./configs/vimrc /home/espuser/.vimrc
# enable X11 forwarding
USER root
RUN sed -i 's/# ForwardX11 no/ForwardX11 yes/g' /etc/ssh/ssh_config
# copy over some useful environment setup scripts
COPY ./configs/esp_env.sh /root
COPY ./configs/esp_env_cad.sh /root
COPY ./configs/bashrc /root/.bashrc
COPY ./configs/tmux.conf /root/.tmux.conf
COPY ./configs/emacs /root/.emacs
COPY ./configs/vimrc /root/.vimrc