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.Configure Import
- 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 Secretoption to enter your git accountUsernameand theGit Token.To generate a secret, navigate to your github accountSettings > Developer Settings > Personal Access Tokens > Generate New Tokenand ensurerepo accessis enabled. Your one-time token will be generated in the next page.
HitVerifyon the bottom-right. - Enter additional configuration details to build your container by expandingAdvanced 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 VersionPYTHON-3.8-RHEL8from 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 asmkdir [Working Dir]/build && cd [Working Dir]/build
- CMAKE Args:Used ascmake [CMAKE Args] ..
- CMAKE Build Args:Used in current directory ascmake --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 |
---|---|---|
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.See Configure imported containers and Select hardware and launch containers for more info.