Run old Vivado with Docker guest OS as CentOS 7.4

About the operating environment of Vivado for Linux

Hello everyone. A common problem with FPGA development is the Vivado version. If it is a project that has been going on for many years, there are cases where the latest Vivado cannot be used. The problem here is when you need to run Vivado on Linux.

According to the Xilinx page, as a Linux that can run Vivado 2018.2.

--Red Hat Enterprise Workstation / Server 7.2, 7.3, and 7.4 (64 bits) --Red Hat Enterprise Workstation 6.6, 6.7, 6.8, and 6.9 (64 bits) --SUSE Linux Enterprise 11.4 and 12.3 (64 bits) --CentOS 7.2, 7.3, and 7.4 (64 bits) --CentOS 6.7, 6.8, and 6.9 (64 bits) --Ubuntu Linux 16.04.3 LTS (64 bits)

Is listed. All of them are old OSs that are at least 3 years old. Even if Vivado 2018.2 is needed in a hurry, it is difficult to tailor a PC with a new environment. That's where Docker comes in.

Environment I tried

Host side OS

Guest OS

procedure

Prepare a Dockerfile

First, I prepared the following Dockerfile.

FROM centos:7.4.1708

RUN yum update -y
RUN yum groupinstall -y "Development Tools"
RUN yum install -y kernel-devel kernel-headers
RUN yum install -y gtk2-devel
RUN yum install -y libcanberra libcanberra-devel
RUN yum install xauth libXtst libXrender -y
RUN yum install -y xeyes
RUN yum install -y sudo
RUN yum clean all

ARG uid=1000
ARG gid=1000
RUN groupadd -g ${uid} kohei && \
    useradd -u ${gid} -g kohei -G wheel,root kohei && \
    chown ${uid}:${gid} -R /home/kohei

RUN echo 'Defaults visiblepw'             >> /etc/sudoers
RUN echo 'kohei ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

USER kohei
WORKDIR /home/kohei

The Dockerfile installs a set of development tools, a set of things needed to run as an X11 client, and sudo. Also, when I first tried it, some libraries were missing, so I am trying to make up for them.

It also allows you to sudo without a password.

Build Docker image

Build with the following command with the image to be built from this Dockerfile as centos_xil.

docker build -t centos_xil .

Launch the built image

docker run -ti --rm --name centos_xil \
           -e DISPLAY=$DISPLAY \
           -v /tmp/.X11-unix/:/tmp/.X11-unix \ 
           -v /home/kohei:/home/kohei \
           centos_xil /bin/bash

It should be noted here that the application is first executed on the guest OS side so that the GUI is displayed on the X server on the host side. The environment variable DISPLAY is passed to the container so that the X11 environment is shared between the container and the host by mounting. Next, you should also note that you are sharing your home directory. The purpose is to prevent the image from becoming bloated by installing Vivado and to save the trouble of exchanging the development environment between the container and the host.

Vivado installation

Run the Vivado installer on the container. The installer should create a temporary file storage in your home directory and download it there. You may not be able to enter the "Downloads" directory, which has a Japanese name. The installation destination is ~ / Xilinx due to permission issues.

Vivado and SDK operation check

By following the above steps, I was able to confirm that Vivado and SDK started without any problems.

For Vivado, I was able to compile the design without any problems.

Referenced pages (in no particular order)

-I understand X11 and Docker a little (but)

-Display the window of the X11 application running on the Docker container on the display

-I want to run a GUI application on a Linux server on the cloud using a Windows client (2)

-Launch GUI with Docker + How to use sudo

-Building docker environment for Xilinx

Recommended Posts

Run old Vivado with Docker guest OS as CentOS 7.4
Run Pico with docker
Run Payara with Docker
Run TAO Core with Docker
Run Rails whenever with docker
Run SQL Server with Docker ToolBox
WordPress with Docker Compose on CentOS 8
Make JupyterLab run anywhere with docker
Run Keras with CentOS7 + Anaconda + Django + Apache
Run Ubuntu + ROS with Docker on Mac
How to run Blazor (C #) with Docker
[Memo] Create a CentOS 8 environment easily with Docker
Run JSP Hello World with Tomcat on Docker
Create jupyter notebook with Docker and run ruby
Run autossh as a systemd service on CentOS