- For this method you only need to install Docker on your machine.
- Ensure that you have sufficient memory allocated to the Virtual Machine (VM) as per our system requirements. Refer to this Docker guide for setting CPU cores and memory limits.
:::{Warning}
The build_openroad.sh
will use the host number of CPUs to compile openroad
.
Please check your Docker daemon setup to make sure all host CPUs are available. If you are not sure, you can check with the command below. If the output number is different from the number of CPUs from your machine, then is recommended that you restrict the number of CPUs used by the scripts (see instructions below). :::
docker run --rm ubuntu:22.04 nproc
Courtesy of Precision Innovations,
they release .deb
installers of OpenROAD for Ubuntu
and Debian on a regular basis.
This greatly helps to reduce the compilation time needed.
We recommend to use a Docker image of a supported OS and install OpenROAD using the prebuilt binaries from Precision Innovations. You can start the container in an interactive mode using the command below.
docker run -it ubuntu:22.04
Now you are ready to install the prebuilt binaries. Please refer to the instructions for installing prebuilt binaries here.
Alternatively, if you would like the latest commits from the OpenROAD repositories, do follow the instructions below.
The following instructions build the docker image with Ubuntu 22.04 as the base OS:
git clone --recursive https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts
cd OpenROAD-flow-scripts
./build_openroad.sh
You can restrict the number of CPUs with the -t|--threads N
argument:
./build_openroad.sh --threads N
The binaries are only available from inside a Docker container. Here is an example of starting a container from the created Docker image.
docker run --rm -it -u $(id -u ${USER}):$(id -g ${USER}) -v $(pwd)/flow:/OpenROAD-flow-scripts/flow openroad/flow-ubuntu22.04-builder
Then, inside docker:
source ./env.sh
yosys -help
openroad -help
cd flow
make
exit
Alternatively you may also use the docker_shell
utility as follows.
It is important that you are in the flow
directory.
cd flow
util/docker_shell make
To use the GUI feature you will need to start the docker with the following command,
For Ubuntu/Debian OS users:
docker run --rm -it \
-u $(id -u ${USER}):$(id -g ${USER}) \
-v $(pwd)/flow:/OpenROAD-flow-scripts/flow \
-e DISPLAY=${DISPLAY} \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v ${HOME}/.Xauthority:/.Xauthority \
--network host \
--security-opt seccomp=unconfined \
openroad/flow-$OS_NAME-builder
Running GUI with Docker on Mac OS X users, refer here.
Then use:
docker run --rm -it -e DISPLAY=<IP_LIKE_FROM_TUTORIAL>:0 --network host --privileged <IMAGE_NAME>
Alternatively, you may also use the docker_shell
utility for GUI as follows.
It is important that you are in the flow
directory.
cd flow
util/docker_shell gui_final
`docker_shell` is a helpful utility to automate the
aforementioned Docker commands using the user's parameters.
Do refer to the documentation [here](./DockerShell.md).
The following instructions build the docker image with a parameterized OS
in two stages. These are for CI and developers that wish to use an OS other
than Ubuntu 22.04; regular users should use the steps from previous sections.
The dev stage installs all dependencies and packages required to run OpenROAD
and OpenROAD Flow Scripts. The build stage generates all binaries needed to run
the flow (i.e., openroad
and yosys
).
git clone --recursive https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts
cd OpenROAD-flow-scripts
./etc/DockerHelper.sh create -target=dev -os=$OS_NAME
./etc/DockerHelper.sh create -target=builder -os=$OS_NAME