Vào thẳng nội dung

Deploy single-application distribution

Although the ecos_core was designed to work along with ecos_server and ecos_ui, the projects can be distributed alone (using via CLI). The target PC is expected to have ecos_core-x.x.x installed beforehand.

The procedure is as follows.

1. Compile the project

python tools/compile_project --source <path_to_project> --dest <path_to_destination>   

For example,

python tools/compile_project --source projects/indad-holes --dest projects/indad-holes/dist

The result will be a folder as follows,

<project_module>
    └──dist/ 
       └── __init__.pyc
       └── predict.pyc
       └── train.pyc
       └── README.md

where,

File Description
*.pyc Compiled python file
others All other files in original folder

The *pyc can be use with python command as normal py file on target PC . For examples

python predict.pyc --model_type patchcore --data_dir "<PATH_TO_TEST_FOLDER>"

Note

The python version of compiling PC and target PC should be similar

2. Create convenient package

For convenience, it would be better to create a .zip with contents as belows.

<project_module>
    └── ecos_core-1.0.0.zip
    └── __init__.pyc
    └── predict.pyc
    └── train.pyc
    └── README.md