Edge Developer Toolbox Developer Guide
Import, Edit, and Build Solutions in VS Code
Resources such as source code, Helm* charts and Dockerfiles can also be imported directly within the VS Code* IDE.
Click Develop AI Application > Tools > Visual Studio Code > Open to launch the VS Code IDE.
Install Extensions (Optional)
To facilitate easier solution development and collaboration, the VS Code editor comes pre-installed with GitHub, Docker Image Build, and Helm Package extensions. You can optionally install additional extensions in your user space. To do so, click on Extensions and choose the plugin to install.
Import, Edit, and Publish Helm Charts
Import Helm Chart from Git Repository
Click Menu > Terminal > New Terminal to launch a terminal
Clone the Git repository to import a Helm chart packaged as a TAR archive file.
You may be asked to allow the editor access to sign into your GitHub account. Follow the prompts to authorize Visual Studio Code to access the repository. Once complete, the Git repository can now be successfully cloned from the VS Code editor and the Helm chart can be accessed from the Explorer
Extract the package to edit the Helm chart.
Edit Helm Chart
Envision a deployment scenario where the application requires to be deployed on a pod with specific requirements. For example, applications built and optimized with the OpenVINO™ Toolkit may require Vector Neural Network Instructions (VNNI) to be enabled and necessitate that they be deployed on a cluster with the required capability. This is a feature called Node Feature Discoverability (NFD). If being deployed on a Kubernetes* cluster, enable NFD through the NodeSelector and specify hard requirements on which node to run the application on.
Open the deployment.yaml and add the nodeselector flag to enable NFD to request a CPU with VNNI capability.
Publish Resource to a Repository
Package the Helm chart into compressed TAR format.
Commit the package into the Git repository.
Use git status command to check which files and changes are not yet tracked by git. This will list the updated Helm chart package.
Add and commit untracked changes to the Git repository.
You may be required to confirm your identity again. Provide the email address and username of the Git account using git config user.email “email” and git config user.name “username”
Commit and push changes to the Git repository with the git push command.
Access the updated Helm package through the Git repository.
Import, Edit and Publish Docker Compose Files
A Docker Compose file is an YAML file that allows you to configure application services. Through VS Code, you can import Docker Compose files from source code repositories, edit them and publish back into the repository.
Import Docker Compose File
Click Menu -> Terminal -> New Terminal to launch a terminal in VS Code.
Clone the Git repository to import the Docker Compose file
The Docker Compose file will now be available within the file explorer to edit.
Edit Docker Compose File
Edit the Docker Compose file to add the services you need to your application. In this example, we have set up two services: ovms-server and ovms-client, established dependencies between the two and setup ports for communication.
Publish Changes to Git Repository through VS Code
From the cloned folder, use git status command to check which files and changes are not yet tracked by git. This will list the updated Docker Compose file.
Add and commit untracked changes to the git repository. You may be required to confirm your identity again. Provide the email address and username of the Git account through the git config user.email “email” and git config user.name “username” commands.
Commit and push changes to the git repository with git push command.
Import and Build Dockerfiles
A Dockerfile is a text document that contains all the commands a user could invoke through the command line to assemble an image. VS Code* provides integrations with utilities such as Git* publish and image build that allow users to seamlessly build Dockerfiles and launch them through the My Workspace tab.
Import Dockerfile from Git Repository
The following example demonstrates how developers can import their own Dockerfiles from a Git repository to replicate the flow.
Click on Menu-> Terminal-> New Terminal to launch a terminal.
Clone the Git repository to import the Dockerfile and required resources.
Upon successful cloning, the resource can be accessed from the VS Code workspace.
Build container using Dockerfile
Double click the Dockerfile to open it in the editor. This sets the default Dockerfile path for use from the Docker Image Builder. Make edits as necessary to set up the runtime parameters.
Click the Image Build icon to launch Docker Image Builder. Pick the Dockerfile, Dockerfile Context Folder and provide the Docker Image Name and Tag for the container image that will be built using the Dockerfile. Click Build Dockerfile.
This triggers the build process.
Incremental builds are now supported to expedite the compilation of Dockerfiles. The first run is exhaustive, whereas subsequent builds leverage cached versions of layers where necessary and only build updates and dependencies.
Upon build completion, the resource can be accessed from the My Workspace -> Application tab and Launch the application on Intel hardware. Learn more about launching and benchmarking applications in the Benchmark Hardware section.