-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
69 lines (62 loc) · 1.68 KB
/
Dockerfile
File metadata and controls
69 lines (62 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
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
# Use Ubuntu 22.04 as the base image
FROM ubuntu:22.04
# Prevent interactive prompts during package installation
ENV DEBIAN_FRONTEND=noninteractive
# 1. Install dependencies for building Yosys and OpenSTA
RUN apt-get update && apt-get install -y \
build-essential \
clang \
bison \
flex \
libreadline-dev \
gawk \
tcl-dev \
libffi-dev \
git \
graphviz \
xdot \
pkg-config \
python3 \
libboost-system-dev \
libboost-python-dev \
libboost-filesystem-dev \
zlib1g-dev \
cmake \
swig \
python3-dev \
curl \
libeigen3-dev \
autoconf \
automake \
libtool \
&& rm -rf /var/lib/apt/lists/*
# 2. Build and Install Yosys (shallow clone to save disk)
WORKDIR /usr/src
RUN git clone --depth 1 --recurse-submodules --shallow-submodules \
https://github.com/YosysHQ/yosys.git yosys \
&& cd yosys \
&& make config-gcc \
&& make -j$(nproc) \
&& make install \
&& cd /usr/src && rm -rf yosys
# 3. Build and Install CUDD (required by OpenSTA)
RUN git clone --depth 1 https://github.com/The-OpenROAD-Project/cudd.git \
&& cd cudd \
&& autoreconf -fi \
&& ./configure --prefix=/usr/local \
&& make -j$(nproc) \
&& make install \
&& cd /usr/src && rm -rf cudd
# 4. Build and Install OpenSTA (shallow clone to save disk)
RUN git clone --depth 1 https://github.com/The-OpenROAD-Project/OpenSTA.git \
&& cd OpenSTA \
&& mkdir build && cd build \
&& cmake .. -DCUDD_DIR=/usr/local \
&& make -j$(nproc) \
&& make install \
&& cd /usr/src && rm -rf OpenSTA
# 5. Verify installations
RUN yosys -V && sta -version
# 6. Final Setup
WORKDIR /workspace
CMD ["bash"]