Skip to content

DL‐Benchmark system setup

Vasiliev Evgenii edited this page Dec 14, 2023 · 4 revisions

Setup OS (Ubuntu 20.04 LTS)

  1. Create root password

    sudo passwd root
  2. Install last drivers

    sudo apt-get update
    sudo apt-get upgrade
    sudo ubuntu-drivers autoinstall
    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)

    curl -fsSL https://get.docker.com/ -o get-docker.sh
    DRY_RUN=1 sudo sh ./get-docker.sh
  6. Install pip for Python

    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 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. Disconnect from docker image using the hotkeys Ctrl+P and Ctrl+Q

Create and run Jenkins pipeline

  1. Open Jenkins webpage in 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 a 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 the 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