Skip to content

QuickDeploymentGuide

valentina-kustikova edited this page Dec 18, 2022 · 6 revisions

Deployment

Quick deployment guide

To deploy DLI, please, follow instructions.

  1. Select the required Dockerfile from the docker folder.

  2. Update all the variables in the file, the necessary variables are marked as ARG.

  3. The following step is to build the image in accordance with docker/README.md

  4. It is required to deploy FTP-server in advance, and create a directory for storing docker images.

  5. Create deployment configuration file according to the src/configs/deploy_configuration_file_template.xml.

  6. Execute src/deployment/deploy.py in accordance with src/deployment/README.md.

Deployment example

  1. Download Deep Learning Inference Benchmark. Clone repo to the /tmp directory using the following commands:

    cd tmp
    git clone https://github.com/itlab-vision/dl-benchmark.git
  2. It is required to deploy FTP-server and create directories. For definiteness, we will use the following names:

    • docker_image_folder is a directory for storing docker image.
    • configs is a directory for storing configurationn files.
    • results is a directory for storing performance results.

    Use these parameters to connect to the FTP-server:

    <IP>2.2.2.2</IP>
    <Login>admin</Login>
    <Password>admin</Password>
  3. For definiteness, we select the OpenVINO Docker container. The Dockerfile to build this image can be found in the /tmp/dl-benchmark/docker/OpenVINO_DLDT directory. Before building, you should put the current link to datasets, it should be a git repository. Please, insert correct path in the following line:

    ARG DATASET_DOWNLOAD_LINK=<Link to dataset project>

  4. To build docker image, please, use the following command:

    docker build -t OpenVINO_Image . 

    The build option searches for the Dockerfile in the current directory and builds the image OpenVINO_Image.

  5. The following step is to add docker image to the archive by the command:

    docker save OpenVINO_Image > OpenVINO_Image.tar
  6. After building the image, you need to fill out the configuration file for the system deployment script. The configuration file template is located in the /tmp/dl-benchmark/src/config/deploy_configuration_file_template.xml directory. Fill the configuration file (information to access to the remote computer) and save it to the /tmp/dl-benchmark/src/deployment/deploy_config.xml file. Please, use the developed GUI application (/tmp/dl-benchmark/src/config_maker).

    <Computers>
      <Computer>
        <IP>4.4.4.4</IP>
        <Login>user</Login>
        <Password>user</Password>
        <OS>Linux</OS>
        <DownloadFolder>/tmp/docker_folder</DownloadFolder>
        <DatasetFolder>/mnt/datasets</DatasetFolder>
        <ModelFolder>/mnt/models</ModelFolder>
      </Computer>
    </Computers>
  7. To run the deployment script, use the following command:

    python3 deploy.py -s 2.2.2.2 -l admin -p admin \
        -i /tmp/dl-benchmark/docker/OpenVINO_Image.tar \
        -d docker_image_folder -n OpenVINO_DLDT \
        --machine_list /tmp/dl-benchmark/src/deployment/deploy_config.xml \
        --project_folder /tmp/dl-benchmark/

    The first three parameters -s, -l, -p are responsible for access to the FTP-server, -i is a path to the archived Docker image, -d is a directory on the FTP-server where the Docker image will be uploaded, -n is an executable name of the Docker container, --machine_list is a configuration file which contains a list of machines on which we plan to deploy our infrastructure.

    After this stage, there is a Docker container at each computer.

Clone this wiki locally