Docker Setup

Docker Setup#

The following steps outline the process for pulling and running the Docker container required for the Vitis AI model quantization and compilation flows.

  1. Pull the Docker image on a system with Docker installed. For installation instructions, see Install Docker Engine on Ubuntu and Linux Post-Installation Steps for Docker Engine. You can also contact your system administrator.

    docker pull amdih/vitis-ai:versal-2ve-release_v6.3_0924
    

    Note

    Docker image pulling can take a few minutes.

  2. Verify the Docker image details (“REPOSITORY”, “IMAGE ID”, and “TAG”):

    docker images
    

    The output appears in the following format:

    REPOSITORY

    TAG

    IMAGE ID

    CREATED

    SIZE

    amdih/vitis-ai

    versal-2ve-release_v6.3_0924

    601671684535

    xx hours ago

    25.3GB

  3. Get the AIEMLv2build build tools license (node locked/floating) as described in Obtaining License. Copy the node locked license file to your workspace at <yourLicenseDir>.

  4. Before starting Docker, create the working directory on the host machine and set the appropriate access permissions so the container can access it:

    mkdir -p yourWorkingDir
    chown -R $(id -u):$(id -g) yourWorkingDir
    chmod -R a+rwx yourWorkingDir
    
  5. Start a Docker container and mount the required directories:

    docker run --ulimit stack=-1:-1 -it --rm --network host -v <yourLicenseDir>:/usr/licenses -v <yourWorkingDir>:/host_mount amdih/vitis-ai:versal-2ve-release_v6.3_0924 bash
    

    This command uses a node-locked license. If you have a floating license, see Docker Run Command with Floating License for example commands to run Docker with a floating license.

    Note

    • Use the -v option to map the host directory (<yourWorkingDir>) to the container directory (/host_mount).

    • The Vitis AI compiler requires sufficient stack space to run. If the available stack size is too small, the compiler reports an error indicating that the failure may be due to inadequate stack size.

    • Large models can require a larger stack size. Use --ulimit stack=-1:-1 to remove the stack limit.