Developer Guide

  • BETA
  • 04/06/2022
  • Public Content

Build with dockerfiles

You can build containers from source code repositories containing
Dockerfiles
. If your repository contains multiple dockerfiles for each of your microservices, you can hand-pick the directory to invoke the dockerfile from and also specify the path with the name of the file with
.Dockerfile
extension.

Navigate to Dockerfile

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

Configure Import

  1. Enter the details of your github repository containing dockerfiles.
    • GIT Repo Url:
      Full browser URL pointing to the root of your repository.
    • Resource Name:
      Unique name to indentify the built container across Container Playground views.
    To import a
    private repository
    , check the
    Private
    box and select a secret from the drop down. If required, create a new secret with the
    +Create New Secret
    option.
    • Secret Name
      : For private repos, 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
    .
    • Dockerfile Path:
      Enter the name of the Dockerfile start from the root of the repository.
    • Git Reference:
      Optional name of a specific branch e.g.
      main
    • Context Dir:
      If your dockerfile contains commands that use relative paths, enter the path to the directory to build the dockerfile from. Make sure the Dockerfile path is relative to Context Dir or the default behavior is from the root of the repository.
    To start building click
    Build
    .

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 can show as
Building
,
Ready
or
Error
.
Once your resource status shows
Ready
, you must
Assign
the container to an existing project to additionally configure container runtime options and launch.
Try out the above flow with an example repository containing a dockerfile:
  • GIT Repo URL:
    https://github.com/intel/DevCloudContent-dockerfile
  • Resource Name:
    ovtf
  • (Advanced Configuration) Context Dir:
    openvino-tensorflow/
  • Dockerfile Path:
    Dockerfile
Assign the resource to a new project
ovtf-project
using the Actions in your resources view. Before launching the project, use Configure imported containers to view the results in your filesystem.
  • Mount Point:
    /app/result/
Above OpenVINO™ Tensorflow Bridge container example outputs two text files in the filesystem, showcasing image classification performance comparison with and without OpenVINO™ backend for Tensorflow.

Product and Performance Information

1

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