-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile.centos7_small
66 lines (55 loc) · 2.58 KB
/
Dockerfile.centos7_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
FROM centos:7
WORKDIR /home
# install python, perl, CAD tools and software toolchain dependencies, miscellaneous
RUN yum install -y python python-pip python3 python3-pip python3-tkinter \
perl perl-Env perl-YAML perl-XML-Simple perl-ExtUtils-MakeMaker \
perl-Thread-Queue perl-Capture-Tiny \
xterm csh ksh zsh tcl glibc-devel glibc-devel.i686 \
glibc-static glibc-static.i686 mesa-libGL.i686 mesa-libGLU.i686 mesa-libGL \
mesa-libGLU mesa-dri-drivers mesa-dri-drivers.i686 readline-devel \
readline-devel.i686 libXp libXp.i686 openmotif ncurses gdbm-devel \
gdbm-devel.i686 libSM libSM.i686 libXcursor libXcursor.i686 libXft \
libXft.i686 libXrandr libXrandr.i686 libXScrnSaver libXScrnSaver.i686 \
libmpc-devel libmpc-devel.i686 nspr nspr.i686 nspr-devel nspr-devel.i686 \
tk tk-devel Xvfb dtc bison flex socat minicom tmux \
git wget bzip2 which gcc gcc-c++ unzip file patch bc \
texinfo texinfo-tex help2man emacs vim xorg-x11-apps java sudo \
net-tools diffstat chrpath autoconf libtool automake glib2-devel
RUN ln -s /lib64/libtiff.so.5 /lib64/libtiff.so.3 && \
ln -s /usr/lib64/libmpc.so.3 /usr/lib64/libmpc.so.2
# install Pmw module
RUN pip3 install Pmw
# create a non-root user with sudo privilege (password:espuser)
RUN useradd -ms /bin/bash espuser && usermod -aG wheel espuser
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN echo 'espuser:espuser' | chpasswd
# switch to the non-root user
USER espuser
WORKDIR /home/espuser
# 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