-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile-corg
More file actions
36 lines (29 loc) · 1.68 KB
/
Dockerfile-corg
File metadata and controls
36 lines (29 loc) · 1.68 KB
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
ARG BASE_CONTAINER=define_as_build_arg
FROM $BASE_CONTAINER
LABEL MAINTAINER="CSEL Ops <admin@cs.colorado.edu>"
USER root
ENV DEBIAN_FRONTEND noninteractive
##
## Install verilator dependencies
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends \
git perl python3 make build-essential libfl2 libfl-dev zlib1g zlib1g-dev \
ccache libgoogle-perftools-dev numactl perl-doc autoconf flex bison \
autoconf automake autotools-dev curl python3 libmpc-dev libmpfr-dev libgmp-dev gawk \
bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev && \
rm -rf /var/lib/apt/lists/*
# Build
#RUN git -c advice.detachedHead=false clone --single-branch --depth=1 --recursive -b v4.036 \
# https://github.com/verilator/verilator.git /tmp/verilator && \
# cd /tmp/verilator && autoconf && unset VERILATOR_ROOT && ./configure && make -j 4 && make install && rm -rf /tmp/verilator
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends \
verilator && \
rm -rf /var/lib/apt/lists/*
# Build risc cross compiler
RUN git clone https://github.com/riscv/riscv-gnu-toolchain /tmp/riscv-gnu-toolchain && \
cd /tmp/riscv-gnu-toolchain && ./configure --prefix=/opt/riscv --with-arch=rv32i && make -j4 && rm -rf /tmp/riscv-gnu-toolchain
RUN rm -rf /home/jovyan && \
mkdir /home/jovyan && \
chown $NB_UID:$NB_GID /home/jovyan
USER $NB_UID