diff --git a/Dockerfile b/Dockerfile index 95304df8971..71f5129301a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive # set out workspace ENV WORKSPACE=/workspace @@ -19,6 +19,7 @@ RUN apt-get update -qq \ libtbb-dev \ python3-pip \ git \ + time \ # Install python packages && pip install -r requirements.txt \ # Cleanup diff --git a/dev/DOCKER_DEPLOY.md b/dev/DOCKER_DEPLOY.md index b3c80fbe741..14eab8cf018 100644 --- a/dev/DOCKER_DEPLOY.md +++ b/dev/DOCKER_DEPLOY.md @@ -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 :8080 -v :/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.