├── .dockerignore ├── Dockerfile ├── LICENSE ├── README.md └── install_config.txt /.dockerignore: -------------------------------------------------------------------------------- 1 | README.md 2 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:18.04 2 | 3 | MAINTAINER z4yx 4 | 5 | # build with docker build --build-arg VIVADO_VERSION=2018.1 --build-arg VIVADO_TAR_FILE=Xilinx_Vivado_SDK_2018.1_0405_1.tar.gz -t vivado:2018.1 . 6 | 7 | ARG UBUNTU_MIRROR=mirror.tuna.tsinghua.edu.cn 8 | 9 | #install dependences for: 10 | # * downloading Vivado (wget) 11 | # * xsim (gcc build-essential to also get make) 12 | # * MIG tool (libglib2.0-0 libsm6 libxi6 libxrender1 libxrandr2 libfreetype6 libfontconfig) 13 | # * CI (git) 14 | RUN sed -i.bak s/archive.ubuntu.com/${UBUNTU_MIRROR}/g /etc/apt/sources.list && \ 15 | apt-get update && apt-get install -y \ 16 | build-essential \ 17 | sudo \ 18 | libxtst6 \ 19 | libglib2.0-0 \ 20 | libsm6 \ 21 | libxi6 \ 22 | libxrender1 \ 23 | libxrandr2 \ 24 | libfreetype6 \ 25 | libfontconfig \ 26 | lsb-release \ 27 | git 28 | 29 | ARG VIVADO_VERSION 30 | ARG VIVADO_TAR_FILE 31 | 32 | RUN mkdir /install_vivado 33 | COPY install_config.txt / 34 | # ADD does the extraction 35 | ADD ${VIVADO_TAR_FILE} /install_vivado/ 36 | 37 | # run the install 38 | RUN ls /install_vivado && /install_vivado/*/xsetup --agree 3rdPartyEULA,WebTalkTerms,XilinxEULA --batch Install --config /install_config.txt && \ 39 | rm -rf /${VIVADO_TAR_FILE} /install_config.txt /install_vivado 40 | 41 | #make a Vivado user 42 | RUN adduser --disabled-password --gecos '' vivado &&\ 43 | usermod -aG sudo vivado &&\ 44 | echo "vivado ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers 45 | 46 | USER vivado 47 | WORKDIR /home/vivado 48 | ENV HOME /home/vivado 49 | ENV VIVADO_VERSION ${VIVADO_VERSION} 50 | 51 | #add vivado tools to path 52 | RUN echo "source /opt/Xilinx/Vivado/${VIVADO_VERSION}/settings64.sh" >> /home/vivado/.bashrc 53 | 54 | #copy in the license file 55 | #RUN mkdir /home/vivado/.Xilinx 56 | #COPY Xilinx.lic /home/vivado/.Xilinx/ 57 | 58 | CMD ["sh","-c","exec /opt/Xilinx/Vivado/${VIVADO_VERSION}/bin/vivado"] 59 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Yuxiang Zhang 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vivado-docker 2 | 3 | Vivado installed into a docker image for CI purposes. 4 | 5 | ## Build instructions 6 | 7 | 1. Copy the Vivado installation package `Xilinx_Vivado_2019.2_1106_2127.tar.gz` to this folder. 8 | 3. Potentialy modify the `install_config.txt` to change the install options. 9 | 4. Build the image (will take about 30 minutes) passing in a build arg 10 | ```shell 11 | docker build --build-arg VIVADO_VERSION=2019.2 --build-arg VIVADO_TAR_FILE=Xilinx_Vivado_2019.2_1106_2127.tar.gz -t vivado:2019.2 . 12 | ``` 13 | 14 | ## Running 15 | 16 | ```shell 17 | docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix vivado:2019.2 18 | ``` 19 | -------------------------------------------------------------------------------- /install_config.txt: -------------------------------------------------------------------------------- 1 | #### Vivado HL WebPACK Install Configuration #### 2 | Edition=Vivado HL WebPACK 3 | 4 | # Path where Xilinx software will be installed. 5 | Destination=/opt/Xilinx 6 | 7 | # Choose the Products/Devices the you would like to install. 8 | Modules=Virtex UltraScale+ HBM:0,Zynq UltraScale+ MPSoC:0,DocNav:0,Kintex UltraScale:0,Artix-7:1,Zynq-7000:1,System Generator for DSP:0,Virtex UltraScale+:0,Kintex UltraScale+:0,Model Composer:0 9 | 10 | # Choose the post install scripts you'd like to run as part of the finalization step. Please note that some of these scripts may require user interaction during runtime. 11 | InstallOptions= 12 | 13 | ## Shortcuts and File associations ## 14 | # Choose whether Start menu/Application menu shortcuts will be created or not. 15 | CreateProgramGroupShortcuts=1 16 | 17 | # Choose the name of the Start menu/Application menu shortcut. This setting will be ignored if you choose NOT to create shortcuts. 18 | ProgramGroupFolder=Xilinx Design Tools 19 | 20 | # Choose whether shortcuts will be created for All users or just the Current user. Shortcuts can be created for all users only if you run the installer as administrator. 21 | CreateShortcutsForAllUsers=0 22 | 23 | # Choose whether shortcuts will be created on the desktop or not. 24 | CreateDesktopShortcuts=1 25 | 26 | # Choose whether file associations will be created or not. 27 | CreateFileAssociation=1 28 | 29 | # Choose whether disk usage will be optimized (reduced) after installation 30 | EnableDiskUsageOptimization=1 31 | 32 | --------------------------------------------------------------------------------