Skip to content

Fixed inconsistency between dev/DOCKER_DEPLOY.md and root Dockerfile #2313

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04
ARG DEBIAN_FRONTEND=noninteractive
# set out workspace
ENV WORKSPACE=/workspace
Expand All @@ -19,6 +19,7 @@ RUN apt-get update -qq \
libtbb-dev \
python3-pip \
git \
time \
# Install python packages
&& pip install -r requirements.txt \
# Cleanup
Expand Down
70 changes: 40 additions & 30 deletions dev/DOCKER_DEPLOY.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,62 @@
Overview
========
# Building VTR on Docker

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

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

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.
## Setup

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

Setup
=====
2. Clone the VTR project:

Install docker (Community Edition is free and sufficient for VTR): https://docs.docker.com/engine/installation/
```
git clone https://github.com/verilog-to-routing/vtr-verilog-to-routing
```

Clone the VTR project:
3. CD to the VTR folder and build the docker image:

`git clone https://github.com/verilog-to-routing/vtr-verilog-to-routing`
```
docker build . -t vtrimg
```

CD to the VTR folder and build the docker image:
4. Start docker with the new image:

`docker build . -t vtrimg`
```
docker run -it -d --name vtr vtrimg
```

Start docker with the new image and connect the current volume with the workspace volume of the container:

`sudo docker run -it -d -p <port-to-open-on-host>:8080 -v <absolute-path-to-VTR-folder>:/workspace vtrimg`
## Running

1. Attach to the Docker container. Attaching will open a shell on the `/workspace` directory within the container.
The project root directory from the docker build process is copied and placed in the `/workspace` directory.

Running
=======
```sh
# from host computer
docker exec -it vtr /bin/bash
```

Open a browser (Google Chrome for example) and navigate to your host's url at the port you opened up. For example:
http://192.168.1.30:8080
1. Verfiy that VTR has been installed correctly:

First, use one of the terminals and compile VTR:
make && make installation/
```sh
# in container
./vtr_flow/scripts/run_vtr_task.py regression_tests/vtr_reg_basic/basic_timing
```

Second, ensure that a basic regression test passes:
./run_reg_test.py vtr_reg_basic
The expected output is:

Third, run and/or modify VTR in the usual way.
```
k6_N10_mem32K_40nm/single_ff OK
k6_N10_mem32K_40nm/single_ff OK
k6_N10_mem32K_40nm/single_wire OK
k6_N10_mem32K_40nm/single_wire OK
k6_N10_mem32K_40nm/diffeq1 OK
k6_N10_mem32K_40nm/diffeq1 OK
k6_N10_mem32K_40nm/ch_intrinsics OK
k6_N10_mem32K_40nm/ch_intrinsics OK
```

Developpement Debugging
=======================
the container already comes with clang as the default compiler and with scan-build the do statistical analysis on the build
set to `debug` in makefile

run `scan-build make -j4` from the root VTR directory.
to output the html analysis to a specific folder, run `scan-build make -j4 -o /some/folder`

the output is html and viewable in any browser.
2. Run and/or modify VTR in the usual way.

Loading