Skip to main content

Deploying Docker Engine on Linux

Before you can install and run Eggplant Generator in a Docker container on a linux system (or systems), you need to verify your system meets the following prerequisites and perform the following pre-deployment steps.

Docker-Specific Software Recommendations for Eggplant Generator on Linux Systems

note

See the Prerequisites page for information about the required hardware and memory for Eggplant Generator.

SoftwareVersion
Ubuntu LTS Linux (64-bit)22/24
Docker EngineEngine up-to-date. See the Install Docker Engine guide for information about installing Docker Engine.
Docker ComposeCompose 2.23.0 or higher
NVIDIA CUDA Driver12.x / up-to-date. See the CUDA Installation Guide for Linux guide for information about installing the CUDA driver.
NVIDIA Container Toolkit1.17.3. See Installing the NVIDIA Container Toolkit — NVIDIA Container Toolkit for more information.

Installation and Pre-Deployment Checklist

info

The examples below uses Ubuntu 24.04.1 as a reference. For other operating systems, the process is basically the same with subtle differences. Refer to the official documentation link above.

Install the Docker Engine

Install the Docker Engine on the linux system where you plan to run the Docker container that will host Eggplant Generator.

  1. Download the required software. Refer to the Software Requirements table above for the list of what you need.

  2. In a terminal, install Docker Engine using the following script. For more information, see Install Docker Engine in the Docker documentation.

    # Add Docker's official GPG key:
    sudo apt-get -y update
    sudo apt-get -y install ca-certificates curl
    sudo install -m 0755 -d /etc/apt/keyrings
    sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
    sudo chmod a+r /etc/apt/keyrings/docker.asc

    # Add the repository to Apt sources:
    echo \
    "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
    $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
    sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
    sudo apt-get update

    sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

    sudo usermod -aG docker ubuntu
    newgrp docker
  3. Verify the Docker Engine installation by running the following command:

    docker run --rm hello-world
  4. Compare the expected output below with the output on your system. The output below (from the command in the previous step) shows a successful Docker Engine installation and configuration.

    Hello from Docker!

    This message shows that your installation appears to be working correctly.

    To generate this message, Docker took the following steps:

    1. The Docker client contacted the Docker daemon.

    2. The Docker daemon pulled the "hello-world" image from the Docker Hub.

    (arm64v8)

    3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.

    4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

    To try something more ambitious, you can run an Ubuntu container with:

    $ docker run -it ubuntu bash

    Share images, automate workflows, and more with a free Docker ID:

    https://hub.docker.com/

    For more examples and ideas, visit:

    https://docs.docker.com/get-started/
    tip

    If you do not have access to a GPU skip the rest of this section and continue to Deploying Eggplant Generator with Docker to install and deploy Eggplant Generator.

Install the NVIDIA CUDA Driver

Install the NVIDIA CUDA driver on the machine where you plan to run the Docker container that will host Eggplant Generator.

  1. If you have not already done so, download the required software. Refer to the Software Recommendations table above for the list of what you need.

  2. Check that the GPU devices exist.

    a. Install the tooling by running the following commands. Refer to the official CUDA driver install documentation for more information.

    sudo apt install -y ubuntu-drivers-common
    sudo ubuntu-drivers devices

    b. Compare the expected output below with the output on your system. The output below (from the command in the previous step) confirms the GPU devices exist.

    == /sys/devices/pci0000:00/0000:00:1e.0 ==
    modalias : pci:v000010DEd00001EB8sv000010DEsd000012A2bc03sc02i00
    vendor : NVIDIA Corporation
    model : TU104GL [Tesla T4]
    driver : nvidia-driver-470-server - distro non-free
    driver : nvidia-driver-535 - distro non-free recommended
    driver : nvidia-driver-470 - distro non-free
    driver : nvidia-driver-535-server - distro non-free
    driver : xserver-xorg-video-nouveau - distro free builtin
  3. Install the NVIDIA CUDA driver.

    a. Run the following command to install the driver:

    sudo ubuntu-drivers autoinstall
    sudo reboot # to take effect

    b. Run the follwing command to verify the driver installed successfully on the system.

     nvidia-smi

    c. Compare the expected output below with the output on your system. The output below (from the command in the previous step) confirms the NVIDIA CUDA driver installed successfully.

    $ nvidia-smi
    +---------------------------------------------------------------------------------------+
    | NVIDIA-SMI 535.183.01 Driver Version: 535.183.01 CUDA Version: 12.2 |
    |-----------------------------------------+----------------------+----------------------+
    | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
    | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
    | | | MIG M. |
    |=========================================+======================+======================|
    | 0 Tesla T4 Off | 00000000:00:1E.0 Off | 0 |
    | N/A 24C P8 11W / 70W | 2MiB / 15360MiB | 0% Default |
    | | | N/A |
    +-----------------------------------------+----------------------+----------------------+

    +---------------------------------------------------------------------------------------+
    | Processes: |
    | GPU GI CI PID Type Process name GPU Memory |
    | ID ID Usage |
    |=======================================================================================|
    | No running processes found |
    +---------------------------------------------------------------------------------------+

Install the NVIDIA Container Toolkit

Install the NVIDIA Container Toolkit on the machine where you plan to run the Docker container that will host Eggplant Generator.

  1. Install the toolkit. Refer to the official NVIDIA Container Toolkit installation documentation for more information.

    curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
    && curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
    sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
    sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list

    sudo apt-get update

    sudo apt-get install -y nvidia-container-toolkit
  2. Configure the Docker Engine to work with the toolkit by running the following command. Refer to the official Docker Engine configuration documentation for more information.

    sudo nvidia-ctk runtime configure --runtime=docker
    sudo systemctl restart docker
  3. Verify the GPU is working.

    a. Run the following command to verify the GPU is working on the container:

    docker run --rm --gpus all nvidia/cuda:12.6.3-base-ubuntu20.04 nvidia-smi

    b. Compare the expected output below with the output on your system. The output below (from the command in the previous step) confirms the GPU is working in the Docker container.

    +---------------------------------------------------------------------------------------+
    | NVIDIA-SMI 535.183.01 Driver Version: 535.183.01 CUDA Version: 12.6 |
    |-----------------------------------------+----------------------+----------------------+
    | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
    | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
    | | | MIG M. |
    |=========================================+======================+======================|
    | 0 Tesla T4 Off | 00000000:00:1E.0 Off | 0 |
    | N/A 24C P8 11W / 70W | 2MiB / 15360MiB | 0% Default |
    | | | N/A |
    +-----------------------------------------+----------------------+----------------------+

    +---------------------------------------------------------------------------------------+
    | Processes: |
    | GPU GI CI PID Type Process name GPU Memory |
    | ID ID Usage |
    |=======================================================================================|
    | No running processes found |
    +---------------------------------------------------------------------------------------+

Next Step: Deploying Eggplant Generator with Docker

After you install and verify your Docker Engine and NVIDIA GPU CUDA configuration, and complete the pre-deployment checklist, continue to Deploying Eggplant Generator with Docker to install and deploy Eggplant Generator.