Skip to content

Commit 496747f

Browse files
authored
Merge pull request The-OpenROAD-Project#3426 from vvbandeira/docs-docker
Update Docker Docs
2 parents d03acf1 + ece0da0 commit 496747f

File tree

4 files changed

+31
-65
lines changed

4 files changed

+31
-65
lines changed

docs/tutorials/FlowTutorial.md

Lines changed: 9 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -49,69 +49,25 @@ Use the `bash` shell to run commands and scripts.
4949

5050
#### OpenROAD-flow-scripts Installation
5151

52-
To install OpenROAD-flow-scripts, refer to the
52+
To install OpenROAD-flow-scripts, refer to the
5353
[Build or installing ORFS Dependencies](https://openroad-flow-scripts.readthedocs.io/en/latest/#build-or-installing-orfs-dependencies)
5454
documentation.
5555

5656
In general, we recommend using `Docker` for an efficient user
57-
experience. Install OpenROAD-flow-scripts using a docker as described
58-
here [Build from sources using Docker](../user/BuildWithDocker.md).
57+
experience. Please refere to the [Docker Shell](../user/DockerShell.md)
58+
documentation.
5959

6060
:::{Note}
61-
If you need to update an existing OpenROAD-flow-scripts installation,
62-
follow instructions from [here](../user/FAQS.md#how-do-i-update-openroad-flow-scripts).
61+
If you need a custom Docker image, you can build your own with the instructions
62+
provided at: [Build from sources using Docker](../user/BuildWithDocker.md).
6363
:::
6464

65-
OpenROAD-flow-scripts installation is complete.
66-
67-
#### Running OpenROAD-flow-scripts inside the Docker
68-
69-
Launch the docker with OpenROAD-flow-scripts container as follows:
70-
71-
```shell
72-
docker run --rm -it -u $(id -u ${USER}):$(id -g ${USER}) -v $(pwd)/flow:/OpenROAD-flow-scripts/flow openroad/flow-ubuntu22.04-builder
73-
```
74-
75-
:::{seealso}
76-
To launch OpenROAD GUI inside the docker, based on the OS, use the command from [here](../user/BuildWithDocker.md#enable-gui-support).
65+
:::{Note}
66+
If you need to update an existing OpenROAD-flow-scripts installation:
67+
- For local installs follow instructions from [here](../user/FAQS.md#how-do-i-update-openroad-flow-scripts).
68+
- For Docker run `docker pull openroad/orfs:latest` to update the image.
7769
:::
7870

79-
Once you are entered into OpenROAD-flow-scripts container run:
80-
81-
```shell
82-
source env.sh
83-
```
84-
85-
If your installation is successful, you will see the following message:
86-
87-
```
88-
OPENROAD: /OpenROAD-flow-scripts/tools/OpenROAD
89-
```
90-
91-
#### Verifying the Docker based Installation
92-
93-
To verify the installation run the built-in example design as follows:
94-
95-
```shell
96-
cd flow
97-
make
98-
```
99-
100-
A successful run end with the log:
101-
102-
```
103-
[INFO] Writing out GDS/OAS 'results/nangate45/gcd/base/6_1_merged.gds'
104-
Elapsed time: 0:10.44[h:]min:sec. CPU time: user 2.17 sys 0.54 (26%). Peak memory: 274184KB.
105-
cp results/nangate45/gcd/base/6_1_merged.gds results/nangate45/gcd/base/6_final.gds
106-
Log Elapsed seconds
107-
1_1_yosys 2
108-
3_3_place_gp 1
109-
4_1_cts 8
110-
5_2_route 10
111-
6_1_merge 10
112-
6_report 3
113-
```
114-
11571
## Configuring The Design
11672

11773
This section shows how to set up the necessary platform and design

docs/user/BuildWithDocker.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Build from sources using Docker
22

3+
:::{Note}
4+
This document describes how to build your own Docker image.
5+
If your goal is to use the latest version of OpenROAD-Flow-Scripts,
6+
please refer to the [Docker Shell](./DockerShell.md) documentation.
7+
:::
8+
39
## Prerequisites
410

511
- For this method you only need to install
@@ -31,9 +37,9 @@ This greatly helps to reduce the compilation time needed.
3137

3238
We recommend to use a Docker image of a supported OS
3339
and install OpenROAD using the pre-built binaries from
34-
Precision Innovations.
35-
You can start the container in an interactive mode using
36-
the command below.
40+
Precision Innovations.
41+
You can start the container in an interactive mode using
42+
the command below.
3743

3844
```shell
3945
docker run -it ubuntu:22.04
@@ -87,7 +93,7 @@ exit
8793
```
8894

8995
Alternatively you may also use the `docker_shell` utility as follows.
90-
It is important that you are in the `flow` directory.
96+
It is important that you are in the `flow` directory.
9197

9298
```shell
9399
cd flow
@@ -121,17 +127,17 @@ Then use:
121127
docker run --rm -it -e DISPLAY=<IP_LIKE_FROM_TUTORIAL>:0 --network host --privileged <IMAGE_NAME>
122128
```
123129

124-
Alternatively, you may also use the `docker_shell` utility for GUI as follows.
125-
It is important that you are in the `flow` directory.
130+
Alternatively, you may also use the `docker_shell` utility for GUI as follows.
131+
It is important that you are in the `flow` directory.
126132

127133
```shell
128134
cd flow
129135
util/docker_shell gui_final
130136
```
131137

132138
```{note}
133-
`docker_shell` is a helpful utility to automate the
134-
aforementioned Docker commands using the user's parameters.
139+
`docker_shell` is a helpful utility to automate the
140+
aforementioned Docker commands using the user's parameters.
135141
Do refer to the documentation [here](./DockerShell.md).
136142
```
137143

docs/user/DockerShell.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
11
Building example design using Docker image
22
==========================================
33

4-
The `docker_shell` script is used as a prefix to launch a command using a OpenROAD docker image.
4+
The `docker_shell` script is used to launch a command using a OpenROAD-flow-scripts docker image.
55

66
Also, the current working directory is mapped into the Docker image using the current user's credentials.
77

88
Build docker image
99
------------------
1010

11-
First build the docker image:
11+
You can skip this step if you would like to use the latest version from the master
12+
branch. If you are developing ORFS/OR, you should build your own image.
1213

1314
```
1415
cd OpenROAD-flow-scripts
1516
./build_openroad.sh
1617
```
1718

19+
Run ORFS using `docker_shell`
20+
-----------------------------
21+
1822
Build an example design and run the GUI:
1923

2024
```
@@ -33,7 +37,7 @@ If you need to use a different Docker image than default, override by using the
3337
environment variable:
3438

3539
```
36-
OR_IMAGE=openroad/flow-ubuntu22.04-builder:v1234 util/docker_shell make
40+
OR_IMAGE=openroad/orfs:v1234 util/docker_shell make
3741
```
3842

3943
If you have built your OpenROAD Docker image using prebuilt binaries,

flow/util/docker_shell

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ docker run $user_args \
6262
-v $WORKSPACE:/OpenROAD-flow-scripts/flow:Z \
6363
--network host \
6464
$DOCKER_INTERACTIVE \
65-
${OR_IMAGE:-openroad/flow-ubuntu22.04-builder:latest} \
65+
${OR_IMAGE:-openroad/orfs:latest} \
6666
bash -c "set -ex
6767
mkdir /tmp/xdg-run
6868
cd /OpenROAD-flow-scripts/flow

0 commit comments

Comments
 (0)