-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (33 loc) · 1.84 KB
/
Copy pathDockerfile
File metadata and controls
39 lines (33 loc) · 1.84 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
37
38
39
FROM nvidia/cuda:13.3.1-devel-ubuntu24.04
ENV DEBIAN_FRONTEND=noninteractive
ENV CARGO_HOME=/usr/local/cargo
ENV RUSTUP_HOME=/usr/local/rustup
ENV PATH=/usr/local/cargo/bin:$PATH
RUN apt-get update && apt-get install -y \
build-essential git curl openjdk-17-jdk-headless \
cmake clang bison flex libreadline-dev autoconf automake libtool libtool-bin \
gawk tcl-dev libffi-dev graphviz xdot pkg-config libhwloc-dev libfxt-dev python3 libboost-system-dev \
libboost-python-dev libboost-filesystem-dev zlib1g-dev gnupg \
&& rm -rf /var/lib/apt/lists/*
# Install the maintained sbt launcher and Go toolchain supplied by Ubuntu 24.04.
RUN apt-get update && apt-get install -y golang-go && \
curl -fsSL https://raw.githubusercontent.com/paulp/sbt-extras/master/sbt \
-o /usr/local/bin/sbt && \
chmod 0755 /usr/local/bin/sbt && \
rm -rf /var/lib/apt/lists/*
# Chrysoberyl is authored in Veryl and is translated to SystemVerilog before
# Yosys synthesis.
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
sh -s -- -y --profile minimal --default-toolchain stable && \
cargo install veryl --version 0.21.0 --locked
# The source tree is bind-mounted at /build and normally owned by the host
# user. Trust the explicitly mounted repositories so Git-dependent Yosys and
# Go builds retain revision metadata when the image runs as root.
RUN for dir in /build /build/Alexandrite /build/Chrysoberyl /build/Iyokan /build/Tangor \
/build/cahp-pearl /build/cahp-rt /build/cahp-ruby /build/cahp-sim \
/build/llvm-cahp /build/yosys /build/yosys/abc \
/build/yosys/libs/cxxopts; do \
git config --system --add safe.directory "$dir"; \
done
# Run the build when executing `docker run`
CMD ["bash", "-c", "make -j$(nproc) ENABLE_CUDA=1 CUDACXX=\"/usr/local/cuda/bin/nvcc\" CUDAHOSTCXX=\"/usr/bin/g++\""]