Target Structure
This page describes the general structure of the target repositories that are used by the dAIEdge-VLab CI/CD. The dAIEdge-VLab CI/CD deploys and run the content of the target repository on a GitLab-Runner that has the target attached. The GitLab-Runner is based on the image describes by the dockerfile in the docker directory of the target repository. Here are some templates and some examples of implementations :
Naming convention
The naming scheme of the target repository is the following: <TARGET>
_<RUNTIME>
Example : TARGET
= STM32L4R9, RUNTIME
= TFLite. The repository name is STM32L4R9_TFLite
.
Folder Structure & Scripts
A target repository must be composed of the following folders :
AI_Support
: Scripts and tools for code generationAI_Project
: Project for the target (AI_Benchmark)AI_Build
: Scripts to cross compile the code for the targetAI_Deploy
: Scripts to deploy (programm) the targetAI_Manager
: Scripts that gather metrics from the target and generate the benchmark report. The final report is saved in theAI_Manager/out
folder.docker
: Contains the dockerfile and environment dependencies
Mandatory scripts
In the folders AI_Support, AI_Build, AI_Deploy, and AI_Manager you must place a bash script with the following names :
support.sh
in AI_Supportbuild.sh
in AI_Builddeploy.sh
in AI_Deploymanager.sh
in AI_Manager
Make sure that these scripts have the correct permissions.
support.sh
script is run first, then the build.sh
, deploy.sh
and finally the manager.sh
script.cd
commands to change the working directory.You can copy and run the commands bellow to create all the mandatory folders and bash scripts.
# Create the folders
mkdir AI_Support
mkdir AI_Project
mkdir AI_Build
mkdir AI_Deploy
mkdir AI_Manager
mkdir AI_Manager/out
mkdir docker
# Create the bash scripts (empty files)
touch AI_Support/support.sh
touch AI_Build/build.sh
touch AI_Deploy/deploy.sh
touch AI_Manager/manager.sh
touch docker/dockerfile
# Give permissions to the scripts
chmod +x AI_Support/support.sh
chmod +x AI_Build/build.sh
chmod +x AI_Deploy/deploy.sh
chmod +x AI_Manager/manager.sh
The resulting structure should look like this :
-
- build.sh
-
- deploy.sh
-
-
-
- manager.sh
-
-
- support.sh
-
- dockerfile