-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile.ubuntu18_full
75 lines (59 loc) · 2.77 KB
/
Dockerfile.ubuntu18_full
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
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 --recursive https://github.com/sld-columbia/esp.git && \
cd /home/espuser/esp/accelerators/third-party/NV_NVDLA && \
rm -rf ip/verif sw/prebuilt sw/regression
RUN cd /home/espuser/esp && rm -rf utils/zynq
RUN cd /home/espuser/esp && \
(echo y; echo /home/espuser/leon; echo 2; echo n; echo n; echo n; echo n) | bash utils/toolchain/build_leon3_toolchain.sh && rm -rf /tmp/_leon3_build && \
(echo y; echo /home/espuser/riscv; echo 2; echo n; echo n; echo n) | bash utils/toolchain/build_riscv_toolchain.sh && rm -rf /tmp/_riscv_build && \
(echo y; echo /home/espuser/riscv32imc; echo 2; echo n) | bash utils/toolchain/build_riscv32imc_toolchain.sh && rm -rf /tmp/_riscv32imc_build
# 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