Skip to content

DL‐Benchmark system setup

Vasiliev Evgenii edited this page Jan 17, 2024 · 4 revisions

Setup OS (Ubuntu 22.04 LTS)

  1. Create root password.

    sudo passwd root
  2. Install last drivers.

    sudo apt-get update
    sudo apt-get upgrade
    sudo reboot
  3. Enable remote access via SSH.

    sudo apt install openssh-server
    sudo systemctl status ssh
    sudo systemctl enable ssh
    sudo ufw allow ssh
  4. Install Git

    sudo apt-get install git
  5. Install docker with root dirs support (for compiling Docker images from Docker).

    sudo apt-get install ca-certificates curl gnupg
    sudo install -m 0755 -d /etc/apt/keyrings
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
    sudo chmod a+r /etc/apt/keyrings/docker.gpg
    echo \
        "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] 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 groupadd docker
    sudo usermod -aG docker $USER

    Restart shell after installing Docker.

  6. Install python3-pip.

    sudo apt-get install python3-pip
  7. Install useful software (optional).

    sudo apt-get install htop
    sudo apt-get install net-tools
  8. Add static IP for device (optional).

Setup Jenkins

  1. Create directory for Jenkins.

    mkdir -m 777 -p /home/itmm/jenkins
  2. Run Jenkins Docker image.

    sudo docker run \
                -u 0 \
                --privileged \
                -d\
                -v /home/itmm/jenkins:/var/jenkins_home \
                -v /var/run/docker.sock:/var/run/docker.sock \
                -v $(which docker):/usr/bin/docker \
                -p 8080:8080 \
                -p 50000:50000 \
                --name dli-jenkins \
                -it jenkins/jenkins:lts-jdk11
  3. Open Jenkins webpage in the browser (<machine_ip>:8080) and finish setup (create user, etc).

  4. In Jenkins settings set the maximum number of concurrent jobs to 1.

  5. In Jenkins settings install additional plugins:

    • Github Branch Source
    • Gradle
    • Pipeline
    • Pipeline: Stage View
    • SSH Build Agents
    • SSH Pipeline Steps
    • Timestamper
  6. After installation and start of Jenkins connect to Jenkins docker using the command docker attach and install Python.

    • docker attach dli-jenkins
    • sudo apt install python3 python3-pip
  7. To disconnect from docker image, please, use the hotkeys Ctrl+P and Ctrl+Q.

Create and run Jenkins pipeline

  1. Open Jenkins webpage in the browser (<machine_ip>:8080). The main Jenkins window looks like image below. On the left is a field with Jenkins settings, where you can configure the behavior of Jenkins or create new tasks. In the central part of the window there is a list of currently existing tasks.

    dashboard

  2. Click on the hyperlink on the task you are interested in to open History of launches. Click on the button "Build now" to start benchmarking pipeline.

    dashboard

  3. Running the DLI benchmark is a complex multi-step task for which the type "Pipeline" is suitable. If you click on the "Create Item" button, a graphical window will appear to create a new task. In our workload case, the best fit is the Pipeline option with all default parameters, and we can think of the task as a set of individual steps. In this case, it is possible to sequentially complete the stages and the time of their work. To be specific, create a task called dl-benchmark_benchmarking and finish its setup.

    dashboard

    Window with additional parameters appears; use default parameters for checkboxes, add GitHub repo path to "Project url" textbox, add source code from src/deployment/jenkins/jenkins_pipeline.groovy file to "Pipeline script" textbox and insert your credentials, click "Apply".

    dashboard

Clone this wiki locally