Install custom artifact bundles
Models and other artifacts, like custom agent versions or custom consul configuration can be shipped inside auto deployable bundles. These bundles are docker images that contain the artifacts to be deployed alongside scripts to deploy them. To create a new bundle or modify an existing one follow this guide first:
The list of all the available bundles is inside the bundles/ directory on the models-ci project on Github.
Once the task is complete you will get a public URL to download the artifact on the summary of the task. After that you have to execute the following commands.
$URL
with the URL to the model bundle provided by the task$BUNDLE
with the name of the artifact, in this case company-1.0.1mkdir custom wget -O custom/$BUNDLE.tar.gz $URL gunzip custom/$BUNDLE.tar.gz ctr -n=k8s.io images import models/$BUNDLE.tar
Now you will need to execute the artifact deployment job. This job will unpack the artifacts from the docker image into a MinIO bucket inside the on-premises cluster and restart any services that use them.
$GV_DEPLOYER_VERSION
with the version of the model deployer available undercharts/
$BUNDLE_VERSION
with the version of the artifact, in this case company-1.0.1helm upgrade \ --install gv-model-deployer charts/gv-model-deployer-$GV_DEPLOYER_VERSION.tgz \ --wait --timeout=10m0s --kubeconfig /etc/rancher/k3s/k3s.yaml \ --set models.version="$BUNDLE_VERSION"
root@ip-172-31-9-140:~# kubectl logs -f ml-model-0jvaycku9prx-84nbf
Uploading models
Added `myminio` successfully.
`/models/AIP-1.0.0.zip` -> `myminio/models-data/AIP-1.0.0.zip`
`/models/Commercial-1.0.0.zip` -> `myminio/models-data/Commercial-1.0.0.zip`
`/models/Default-1.0.0.zip` -> `myminio/models-data/Default-1.0.0.zip`
`/models/classifier-6.1.2.zip` -> `myminio/models-data/classifier-6.1.2.zip`
`/models/lm-full-en-2.1.2.zip` -> `myminio/models-data/lm-full-en-2.1.2.zip`
`/models/sec-mapped-1.0.0.zip` -> `myminio/models-data/sec-mapped-1.0.0.zip`
Total: 0 B, Transferred: 297.38 MiB, Speed: 684.36 MiB/s
Restart classifier
deployment.apps/classifier-focus restarted
root@ip-172-31-9-140:~#
In addition, you can enter the different services that consume these artifacts to check if they have been correctly deployed. For example, for the models you can open a shell inside the classifier containers and check the /models directory or check the models-data bucket inside MinIO. Both should contain the expected models.