Skip to content

Commit 8f20622

Browse files
authored
Merge pull request #2313 from Kashiwade-music/update-dockerfile-and-doc
Fixed inconsistency between dev/DOCKER_DEPLOY.md and root Dockerfile
2 parents f4bd1be + 82aad48 commit 8f20622

File tree

2 files changed

+42
-31
lines changed

2 files changed

+42
-31
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:20.04
1+
FROM ubuntu:22.04
22
ARG DEBIAN_FRONTEND=noninteractive
33
# set out workspace
44
ENV WORKSPACE=/workspace
@@ -19,6 +19,7 @@ RUN apt-get update -qq \
1919
libtbb-dev \
2020
python3-pip \
2121
git \
22+
time \
2223
# Install python packages
2324
&& pip install -r requirements.txt \
2425
# Cleanup

dev/DOCKER_DEPLOY.md

Lines changed: 40 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,62 @@
1-
Overview
2-
========
1+
# Building VTR on Docker
32

3+
## Overview
44
Docker creates an isolated container on your system so you know that VTR will run without further configurations nor affecting any other work.
55

66
Our Docker file sets up this enviroment by installing all necessary Linux packages and applications as well as Perl modules.
77

8-
Additionally, Cloud9 is installed, which enables the remote management of your container through browser. With Cloud9, VTR can be started easier (and even modified and recompiled) without the need to logging into a terminal. If the Cloud9 endpoint is published outside your LAN, you can also execute VTR remotely or share your screen with other users.
8+
## Setup
99

10+
1. Install docker (Community Edition is free and sufficient for VTR): https://docs.docker.com/engine/install/
1011

11-
Setup
12-
=====
12+
2. Clone the VTR project:
1313

14-
Install docker (Community Edition is free and sufficient for VTR): https://docs.docker.com/engine/installation/
14+
```
15+
git clone https://github.com/verilog-to-routing/vtr-verilog-to-routing
16+
```
1517
16-
Clone the VTR project:
18+
3. CD to the VTR folder and build the docker image:
1719
18-
`git clone https://github.com/verilog-to-routing/vtr-verilog-to-routing`
20+
```
21+
docker build . -t vtrimg
22+
```
1923
20-
CD to the VTR folder and build the docker image:
24+
4. Start docker with the new image:
2125
22-
`docker build . -t vtrimg`
26+
```
27+
docker run -it -d --name vtr vtrimg
28+
```
2329
24-
Start docker with the new image and connect the current volume with the workspace volume of the container:
2530
26-
`sudo docker run -it -d -p <port-to-open-on-host>:8080 -v <absolute-path-to-VTR-folder>:/workspace vtrimg`
31+
## Running
2732
33+
1. Attach to the Docker container. Attaching will open a shell on the `/workspace` directory within the container.
34+
The project root directory from the docker build process is copied and placed in the `/workspace` directory.
2835
29-
Running
30-
=======
36+
```sh
37+
# from host computer
38+
docker exec -it vtr /bin/bash
39+
```
3140
32-
Open a browser (Google Chrome for example) and navigate to your host's url at the port you opened up. For example:
33-
http://192.168.1.30:8080
41+
1. Verfiy that VTR has been installed correctly:
3442
35-
First, use one of the terminals and compile VTR:
36-
make && make installation/
43+
```sh
44+
# in container
45+
./vtr_flow/scripts/run_vtr_task.py regression_tests/vtr_reg_basic/basic_timing
46+
```
3747
38-
Second, ensure that a basic regression test passes:
39-
./run_reg_test.py vtr_reg_basic
48+
The expected output is:
4049
41-
Third, run and/or modify VTR in the usual way.
50+
```
51+
k6_N10_mem32K_40nm/single_ff OK
52+
k6_N10_mem32K_40nm/single_ff OK
53+
k6_N10_mem32K_40nm/single_wire OK
54+
k6_N10_mem32K_40nm/single_wire OK
55+
k6_N10_mem32K_40nm/diffeq1 OK
56+
k6_N10_mem32K_40nm/diffeq1 OK
57+
k6_N10_mem32K_40nm/ch_intrinsics OK
58+
k6_N10_mem32K_40nm/ch_intrinsics OK
59+
```
4260
43-
Developpement Debugging
44-
=======================
45-
the container already comes with clang as the default compiler and with scan-build the do statistical analysis on the build
46-
set to `debug` in makefile
47-
48-
run `scan-build make -j4` from the root VTR directory.
49-
to output the html analysis to a specific folder, run `scan-build make -j4 -o /some/folder`
50-
51-
the output is html and viewable in any browser.
61+
2. Run and/or modify VTR in the usual way.
5262

0 commit comments

Comments
 (0)