Developer Guide

  • BETA
  • 04/06/2022
  • Public Content

Build from application source without dockerfiles

You can build containers directly from application source hosted in code repositories without a
dockerfile
. If your repository contains application source for multiple microservices, you can hand-pick the directory to package in your container.
Your application source can be in
Java
,
Python
,
PHP
,
NodeJS
and
Golang
. For applications requiring OpenVINO™ Toolkit dependencies,
CPP
and
Python
languages are supported.

Navigate to Git Repo

Use your
Dashboard
view to access the
+Import Resources
option and select
Git Repo
.

Configure Import

  1. Enter the details of your github repository containing your application source.
    • GIT Repo Url:
      Full browser URL pointing to the root of your repository.
    • Resource Name:
      Unique name to indentify the built container
    • Secret Name
      : For private repositories, select a secret from the drop down or use the
      +Create New Secret
      option to enter your git account
      Username
      and the
      Git Token
      .
      To generate a secret, navigate to your github account
      Settings > Developer Settings > Personal Access Tokens > Generate New Token
      and ensure
      repo access
      is enabled. Your one-time token will be generated in the next page.
    Hit
    Verify
    on the bottom-right.
  2. Enter additional configuration details to build your container by expanding
    Advanced Configuration
    .
    • Git Reference:
      Optional name of a specific branch e.g.
      main
    • Context Dir:
      Enter the path to the directory containing your application source.

Builder image

To build containers with no package dependecies, select the appropriate
programming language environment
for your container base image and an
Image Version
.
The devcloud portal will detect standard language specific source files from your code repository and build a ready-to-run container from your application source.
Programming Language
Source Files
Python
app.py for entrypoint and requirements.txt for installing any dependencies
Java
pom.xml
PHP
index.php and composer.json
NodeJS
server.js and package.json
Go
single .go extension file
NodeJS
server.js and package.json
Try out an
Builder Image
example for python application source:
  • GIT Repo URL:
    https://github.com/DevcloudContent/git-import-external
  • Resource Name:
    opencv-contour-detection
  • (Advanced Configuration) Context Dir:
    Contour-Detection-using-OpenCV/
  • Select (Builder Image) Python and Image Version
    PYTHON-3.8-RHEL8
    from the drop-down list.
Assign the resource to a new project
python-project
using the Actions in your resources view. Before launching, use Configure imported containers to view the results in your filesystem.
  • Mount Point:
    /data/
Above opencv contour detection container outputs 3 images, showcasing red channel, blue channel and green channel overlayed pixels.

Builder with base image

To build containers with pre-installed dependencies such as OpenVINO™ Toolkit, select the dependency and version from
Catalog Name
and
Version
drop-downs. Select the appropriate
programming language environment
and fill in the optional configurations.
  • Pre Build Script:
    Optional setup shell script to download or extract packages
  • Working Dir:
    Used as
    mkdir [Working Dir]/build && cd [Working Dir]/build
  • CMAKE Args:
    Used as
    cmake [CMAKE Args] ..
  • CMAKE Build Args:
    Used in current directory as
    cmake --build . [CMAKE Build Args]
  • Post Build Script:
    Run any OpenVINO™ utilities like downloader.py or convertor.py
  • Entry Point:
    Required to indicate shell script to run in container runtime
Catalog Name
Version
Information
OpenVINO™
2021.3, 2021.4
Python, C++ languages with capabilities supported in data_dev
Try out an
Builder with Base Image
example for cpp application source:
  • GIT Repo Url:
    https://github.com/intel/DevCloudContent-git
  • Resource Name:
    openvino-cpp
  • (Advanced Configuration) Context Dir:
    Cpp-OpenVINO-sample/
Select (Builder with Base image) Catalog Name
OpenVINO
and Version
2021.4
from drop-down lists with the
CPP
option.
  • Pre Build Script:
    pre-build-script.sh
  • Working Dir:
    open_model_zoo-2021.4/demos
  • CMAKE Args:
    -DCMAKE_BUILD_TYPE=Release
  • CMAKE Build Args:
    --target crossroad_camera_demo
  • Post Build Script:
    post-build-script.sh
  • Entry Point:
    run.sh
Build process will take a few minutes. Once ready, assign the resource to a new project
openvino-cpp-project
using the Actions in your resources view. Before launching, use Configure imported containers to view the results in your filesystem.
  • Mount Point:
    /data/
Above openvino dependency cpp container builds an executable using cmake, downloads and converts the required models. Upon launching, the container performs inference in runtime and saves the resulting labeled video in the filesystem to download and view.
You can also try out an
Builder with Base Image
example for python application source:
  • GIT Repo Url:
    https://github.com/intel/DevCloudContent-git
  • Resource Name:
    openvino-python
  • (Advanced Configuration) Context Dir:
    Python-OpenVINO-sample/
  • Builder Image with Dependency:
    Python
  • Pre Build Script :
    pre-build-python.sh
  • Entry Point :
    run_python.sh
Similar to cpp example, make sure to configure
Mount Point
as
/data/
before launching to retrieve results. The python example demonstrates face detection mtcnn from the open-model-zoo repository. The models are downloaded and converted as pre-build steps and only inference is executed during container runtime.

View build status

Select the
My Library
option to continue monitoring the build status in the background from your resources view.
From your
Resources
view, use the
Actions
option next to your
Resource Name
to view build logs, change build configuration or rebuild. Your status will can range from
Building
,
Ready
to
Error
.
Once your resource status shows
Ready
, you must
Assign
the container to an existing project to additionally configure container runtime options and launch.

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.