Skip to content

Commit 80b2060

Browse files
committed
Migrated Docker ORFS quickstart guide from Google Doc to MD
fixed typo Signed-off-by: Jeff Ng <[email protected]>
1 parent a088445 commit 80b2060

File tree

5 files changed

+271
-0
lines changed

5 files changed

+271
-0
lines changed
Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
# OpenROAD Docker Software Package Quickstart Guide
2+
3+
# Setup Guide
4+
5+
This setup guide covers machine and software package installation instructions for use with the OpenROAD and OpenROAD Autotuner products. It is intended to be a reference for those setting up a machine to run OpenROAD on.
6+
7+
# Host Machine Requirements
8+
9+
We suggest running a Ubuntu 22.04 or Red Hat Enterprise Linux 8 image with at least 32 CPUs, 128 GB memory, and 500 GB disk.
10+
11+
# Software Packages
12+
13+
The following are software packages that need to be installed to run OpenROAD or OpenROAD Autotuner using docker.
14+
15+
## Docker Installation
16+
17+
We will use Docker to create and run an image that contains everything you need to run the OpenROAD flow. If you already have Docker installed on your cloud machine, you can skip this step.
18+
19+
### Ubuntu Installation
20+
21+
To install Docker:
22+
23+
```
24+
sudo snap install docker
25+
sudo groupadd docker
26+
```
27+
28+
The docker group needs to be created in order to access the pipe used by docker.
29+
30+
### Red Hat Enterprise Linux Installation
31+
32+
To install Docker:
33+
34+
```
35+
sudo dnf install dnf-plugins-core -y
36+
sudo dnf config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo
37+
sudo dnf install --allowerasing -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin sudo systemctl start docker
38+
```
39+
40+
The RHEL docker installation automatically adds the docker group to the system, so you can skip the next step.
41+
42+
### Adding the Docker Group to your User
43+
44+
Add the docker group to your user to it, so that you have access to the docker pipe:
45+
46+
```
47+
sudo usermod -aG docker $USER
48+
```
49+
50+
Note that you might either need to log out/log back in or reboot in order for the group change to take effect.
51+
52+
To test that docker is working:
53+
54+
```
55+
docker run hello-world
56+
```
57+
58+
## Podman-Docker Installation
59+
Note: These instructions might only be applicable to RHEL only
60+
61+
Alternatively, you can install podman instead of docker. On RHEL systems, podman might already be installed. To emulate the docker CLI using podman, install the podman-docker package:
62+
63+
```
64+
sudo yum install podman-docker
65+
```
66+
67+
To quiet the docker compatibility message:
68+
69+
```
70+
sudo touch /etc/containers/nodocker
71+
```
72+
73+
## VNC Installation
74+
75+
If you are interested in using the OpenROAD GUI to track the run or view the results, you’ll need to install VNC on the cloud machine. If you have these already installed on the host machine, you can skip this step.
76+
77+
### Ubuntu Installation
78+
79+
To install:
80+
81+
```
82+
sudo apt update
83+
sudo apt upgrade -y
84+
sudo apt install tigervnc-standalone-server tigervnc-xorg-extension tigervnc-viewer -y
85+
sudo apt install xfce4-goodies xfce4 -y
86+
```
87+
88+
Start a vncserver session on the cloud machine and connect the VNC client to it.
89+
90+
### Red Hat Enterprise Linux Installation
91+
92+
To install:
93+
94+
```
95+
sudo dnf update -y
96+
sudo dnf install tigervnc-server tigervnc-server-module -y
97+
sudo dnf groupinstall "Server with GUI" -y
98+
```
99+
100+
Start a vncserver session on the cloud machine and connect the VNC client to it.
101+
102+
## XHost Access
103+
104+
In order for the docker container to display the GUI, you must enable docker containers access to the X11 display on the cloud machine. To enable access:
105+
106+
```
107+
xhost +local:docker
108+
touch /tmp/.docker.xauth
109+
```
110+
111+
## Git Installation
112+
Note: These instructions are applicable to RHEL only
113+
114+
To install git:
115+
116+
```
117+
sudo dnf install git-core -y
118+
```
119+
120+
## Firefox Installation
121+
Note: These instructions are applicable to Ubuntu only
122+
123+
Firefox (or your favorite browser) enables you to view the OpenROAD AutoTuner results via TensorBoard. If you have already installed firefox on the cloud machine, you can skip this step.
124+
125+
To install firefox:
126+
127+
```
128+
sudo snap install firefox
129+
```
130+
131+
## TensorBoard Installation
132+
133+
### Ubuntu Installation
134+
135+
If you want to run TensorBoard on the cloud machine, type the following to install it:
136+
137+
```
138+
sudo apt install python3-pip -y
139+
sudo pip install tensorboard
140+
```
141+
142+
### Red Hat Enterprise Linux Installation
143+
144+
If you want to run TensorBoard on the cloud machine, type the following to install it:
145+
146+
```
147+
sudo dnf install python3-pip -y
148+
sudo dnf install redhat-rpm-config -y
149+
sudo dnf install python3-devel
150+
sudo dnf groupinstall “Development Tools” -y
151+
sudo pip3 install tensorboard
152+
```
153+
154+
# Choosing The ORFS Version
155+
156+
The OpenROAD team frequently releases new versions of ORFS and publishes them on [Docker Hub](https://hub.docker.com/r/openroad/orfs/tags)). Based upon your needs, you can choose which version to use in your flow.
157+
158+
Each version has a listing, which includes the ORFS tag:
159+
160+
![](images/orfs_dockerhub_tag.png)
161+
162+
In our example above, the tag is v3.0-2144-gd8465608, where 2144 is the build number and gd8465608 is a hash that is related to the corresponding commit tag in the Git OpenROAD-flow-scripts repository.
163+
164+
## Locating the Commit in the OpenROAD-flow-scripts Repository
165+
166+
Locating the commit in the OpenROAD-flow-scripts repository is important in this flow to ensure that the ORFS scripts and the ORFS tools are aligned. It can also be helpful in case you require a specific feature or fix in your flow.
167+
168+
The ORFS Git commit tag version is similar to the Docker Hub tag, but might not be exact. Generally-speaking the Docker Hub tag is the ORFS Git commit tag with a “g” prepended to it and possibly another digit at the end. For the example below, the ORFS Git commit tag is d846560 and the Docker Hub tag is gd8465608.
169+
170+
Please consult the [ORFS git history](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/commits/master/) to find the commit tag that most closely matches the Docker version tag. The commit tag is listed on the right side of each commit (d846560):
171+
172+
![](images/orfs_git_commit.png)
173+
174+
# Workspace Creation
175+
176+
We want to store all of our design’s artifacts on the cloud machine’s filesystem, so that all OpenROAD tool invocations can use the same artifacts.
177+
178+
## Clone the ORFS Flow Directory
179+
180+
The easiest way to create the workspace is to clone out the OpenROAD-flow-scripts repository from git onto our host machine and then share it with Docker. In order to ensure that there’s compatibility between the OpenROAD tool and the flow scripts, we’ll want to access the same ORFS version as what we are using in the Docker container defined in the “Locating the Commit in the OpenROAD-flow-scripts Repository” section above (e.g. version d846560)
181+
182+
To clone the repository:
183+
184+
```
185+
git clone --recursive https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts.git
186+
cd OpenROAD-flow-scripts
187+
git checkout d846560
188+
```
189+
190+
Note that if we change the version of the ORFS tools we are using, we will also need to run “git pull” followed by a “git checkout” with the corresponding Git commit tag.
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# OpenROAD Docker Quickstart Guide
2+
3+
# Setup Guide
4+
5+
The easiest method for running the OpenROAD flow scripts (ORFS) on a cloud machine is through a Docker container, which doesn’t require any code compilation. We suggest running a Ubuntu 22.04 or Red Hat Enterprise Linux 8 image with at least 32 CPUs, 128 GB memory, and 500 GB disk.
6+
7+
The cloud machine serves three purposes:
8+
9+
1. Hosts the Docker container
10+
2. Hosts the persistent filesystem for the results of your OpenROAD runs
11+
3. Enables you to view the OpenROAD results through the OpenROAD GUI
12+
13+
# Host Machine Setup Requirements
14+
15+
Running the OpenROAD flow a Docker container requires a few software packages to be installed on the cloud machine:
16+
17+
- [Docker (or Podman)](DockerORPackageQuickstart.md#docker-installation)
18+
- [Podman-docker](DockerORPackageQuickstart.md#podman-docker-installation) (if using Podman)
19+
- [VNC](DockerORPackageQuickstart.md#vnc-installation)
20+
- [XHost access](DockerORPackageQuickstart.md#xhost-access)
21+
- [Git](DockerORPackageQuickstart.md#git-installation) (RHEL only)
22+
23+
If these packages are already installed on your cloud machine, you are ready to run ORFS. Otherwise, please follow the instructions in the links above to install the packages.
24+
25+
# Choosing The ORFS Version
26+
27+
See the [Choosing The ORFS Version](DockerORPackageQuickstart.md#choosing-the-orfs-version) section for instructions on how to choose an ORFS version and create your workspace.
28+
29+
# OpenROAD Execution
30+
31+
## Using Docker Shell
32+
33+
The ORFS tools provide a utility called docker\_shell, which can be used to execute commands within a Docker container. The script is located in flow/utils/docker\_shell under the ORFS root directory.
34+
35+
To execute our Docker container as a shell, we can run the following command on our cloud machine:
36+
37+
```
38+
cd flow
39+
export OR_IMAGE=openroad/orfs:v3.0-2144-gd8465608
40+
util/docker_shell <shell_command>
41+
```
42+
43+
We use the OR\_IMAGE environment variable to tell docker\_shell which version of ORFS we want to run. Then we can run docker\_shell with the shell command we want to execute within the container, which allows us to run the ORFS flow just like if it was installed on your cloud machine.
44+
45+
Note that on RHEL, you might need to include the location of the docker repository in the OR\_IMAGE environment variable:
46+
47+
```
48+
export OR_IMAGE=docker.io/openroad/orfs:v3.0-2144-gd8465608
49+
```
50+
51+
## Running OpenROAD
52+
53+
The ORFS flow leverages “make” to define the flow variables that control the flow and manages the tool execution based on dependencies. To build all stages for the IBEX design on the ASAP7 platform, execute:
54+
55+
```
56+
./util/docker_shell make DESIGN_CONFIG=designs/asap7/ibex/config.mk
57+
```
58+
59+
All of the data is stored in the flows directory in the following sub-directories:
60+
61+
- results: contains the ORFS generated databases and design files
62+
- logs: contains the ORFS stage log files
63+
- reports: contains the ORFS stage reports
64+
65+
## Running the OpenROAD GUI
66+
67+
To run the OpenROAD GUI to view the final stage results:
68+
69+
```
70+
./util/docker_shell make DESIGN_CONFIG=designs/asap7/ibex/config.mk gui_final
71+
````
72+
73+
You can explore the design hierarchy, heat maps, clock tree, and timing reports directly from within the GUI.
74+
75+
# References
76+
77+
OpenROAD-flow-scripts documentation: [link](https://openroad-flow-scripts.readthedocs.io/en/latest/index2.html)
78+
OpenROAD-flow-scripts tutorial: [link](https://openroad-flow-scripts.readthedocs.io/en/latest/tutorials/FlowTutorial.html)
79+
OpenROAD-flow-scripts GUI tutorial: [link](https://openroad-flow-scripts.readthedocs.io/en/latest/tutorials/FlowTutorial.html#openroad-gui)

docs/tutorials/TutorialHome.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@
33
The links to the main flow tutorial, where we go through each step of
44
the RTL-GDSII flow are as [follows](FlowTutorial.md). We have also provided
55
Google Colab packaging for ease of experimentation [here](Notebooks.md).
6+
7+
If you are interested in running OpenROAD locally, also check out the [Docker OpenROAD Quickstart Guide](DockerORQuickstart.md).
78.1 KB
Loading
68.4 KB
Loading

0 commit comments

Comments
 (0)