Deploying VPAIF-N AI workloads in an air-gapped Deep learning VM(DLVM) or vSphere Kubernetes Service(VKS) environment will need a local Harbor registry with all required container images, helm charts and model files.
A sample script is provided with this article that will help mirror resources for VPAIF-N AI workloads to a local harbor registry.
You can download the sample script and two configuration files from the zip file attached to this article. Unzip the attached zip file and ensure that the files vpaifn-airgap-res-mirror.sh, config.env and bom.json, are located in the same directory
VMware Private AI Foundation 9.0
The script vpaifn-airgap-res-mirror.sh
is designed to mirror all required resources, including container images, helm charts, model files, for VPAIF-N AI workloads deployment in an air-gapped DLVM or VKS environment.
This script is accompanied by a configuration file config.env
and a resource specification file BOM.json.
Users are required to edit file config.env to provide necessary information before executing this script. The BOM.json file contains all resources that will be mirrored.
Software | Official Link |
docker | https://docs.docker.com/engine/install/ubuntu/ |
jq | https://jqlang.org/download/ |
helm | https://helm.sh/docs/intro/install/ |
vcf cli pais plugin |
Please refer the below instructions: VCF CLI Follow the below steps to install VCF CLI and pais plugin:
Docker: If run docker as non-root user, please refer to following document: https://docs.docker.com/engine/install/linux-postinstall/ |
Software | Official Link |
helm | https://helm.sh/docs/intro/install/ |
$ sudo rm /etc/docker/daemon.json
$ sudo systemctl restart docker
If you are running this script through proxy, please execute the following steps:
$ export HTTP_PROXY=""$HTTP_PROXY""
$ export HTTPS_PROXY=""$HTTPS_PROXY""
$ export NO_PROXY=""$NO_PROXY""
$ sudo mkdir -p /etc/systemd/system/docker.service.d
$ cat <<EOF > /etc/systemd/system/docker.service.d/proxy.conf
[Service]
Environment="HTTP_PROXY=http://proxy.example.com:3128"
Environment="HTTPS_PROXY=https://proxy.example.com:3129"
Environment="NO_PROXY=localhost,127.0.0.1,docker-registry.example.com,.corp"
EOF
$ systemctl daemon-reload
$ systemctl restart docker
This file specifies all resources to be mirrored by this script. Edit bom.json under the guidance of Broadcom support only.
$ ./vpaifn-airgap-res-mirror.sh --all
Options
-l, --pull : Pull all resources to local disk storage.
-s, --push : Push all resources to local Harbor registry.
-a, --all : Perform both pull and push operations sequentially.
-h, --help : Display help information.
./vpaifn-airgap-res-mirror.sh --all
./vpaifn-airgap-res-mirror.sh --pull
./vpaifn-airgap-res-mirror.sh --push