GenSynth Documentation

How to Install GenSynth Packages

Packages provide tutorials, templates, examples, and other add-ons to GenSynth. Obtain the archive of available packages from your DarwinAI representative.

The archive of packages must be placed in a folder that is readable from within the GenSynth API container of the GenSynth cluster. Going forward, we call this folder the packages-download folder.

Within the packages-download folder, you will see a folder for each package name; each package folder contains a _package.yaml file, a .tgz file, and perhaps a file.

ls imagenet_builder/ _package.yaml imagenet_builder--1.0.3.tgz

To install packages, you must work from the command line within the API container. For example, enter an interactive shell:

docker exec -it gensynth-api bash

Listing Available Packages

List or install packages using the resource-install tool in the packages-download folder. Change directory (cd) to this folder.

Verify that you can list the available packages. A list of packages, versions and descriptions should be displayed.

$ ./resource-install --list 
Searching for packages suitable for GenSynth version 1.13.0 
Name         Version Installed Description 
====         ======= ========= =========== 
avod_builder 1.0.2   -         builder package for avod model avod_kitti_3d 1.1.0 - 
                               Saved avod model that works with kitti data. 


Verifying Your Workspace

The destination for files installed by any package depends on the GENSYNTH_WORKSPACE_PATH environment variable. As with other uses of the workspace, this must be a shared filesystem folder available to all nodes of the cluster. Ensure it is set properly. If it is not set, files will be installed under/gensynth/workspace/. If you wish to change it, ensure the Docker container has been started with the GENSYNTH_WORKSPACE_PATH defined in the environment. Ensure PYTHONPATH is also defined in the environment, with the same value as GENSYNTH_WORKSPACE_PATH.

Installing a Package

Use resource-install with the --install argument to install a package. Dependencies will automatically be installed. Use resource-install with the --install-all argument to install everything in the packages-download folder.

user@hostname:/gensynth/packages$ ./resource-install --install simpnet_tutorial
Searching for packages suitable for GenSynth version 1.13.0
installing package cifar10--1.0.0
installing package sql_tool--2.0.0
installing package simpnet_cifar10--1.1.0
Executing post-install script
installing package simpnet_tutorial--2.1.0
Executing post-install script


Ignore any WARNING from TensorFlow.

All packages add files under the workspace. If you change the workspace folder or delete its contents, you must reinstall packages.

Some packages update the database, such as when installing Entities or Templates. So if you clear your database or configure a new one, you must reinstall the packages. You may force a re-install of a package with the --force flag. Using force and -install-all together will install/reinstall all packages from the packages-download folder.

Upgrading Packages

When new packages are available, download them into the packages-download folder and run resource-install --list. If you list the packages and see that newer versions are available, simply install the same package again by name. If you want to install all available upgrades (recommended), run resource-install with the --install-all argument.