Kubernetes 部署#

要开始使用 Audio2Face 集群的简单 kubernetes 部署,您可以使用我们的快速部署脚本。

它假定以下依赖项
  • microk8s

  • microk8s GPU 插件 运行 NVIDIA GPU 操作器。

  • 有效的 NGC 令牌,用于连接到 NVIDIA 的镜像仓库,以及配置的 NGC CLI。

确保您拥有NVAIE 访问权限 和您的个人密钥

注意

如果这是您第一次部署 A2F 并且您的主机已经设置了 kubernetes,请删除 ~/.kube/ 文件夹。如果需要,您可以备份此文件夹

$ mv ~/.kube ~/.kube.bk

1. 安装 microk8s,GPU 插件,设置本地路径 provisioner 并设置密钥#

运行以下命令以使用 snap 安装带有 GPU 插件的 microk8s。

$ if [ -d $HOME/.kube ]; then
          echo "kubernetes already setup; skipping microk8s installation; please rm -rf $HOME/.kube to force installation"
  else
          sudo snap install microk8s --revision=5891 --classic
          sudo microk8s enable gpu --version v23.6.1
          sudo snap install --classic kubectl
          sudo snap install helm --classic
          sudo usermod -a -G microk8s ${USER}
          mkdir -p $HOME/.kube
          sudo microk8s config > $HOME/.kube/config
          sudo chown $(id -u):$(id -g) $HOME/.kube/config
          sudo microk8s stop
          sudo microk8s refresh-certs --cert ca.crt
          sudo microk8s start
          sudo microk8s status --wait-ready
  fi

然后为了避免使用 sudo 运行

$ newgrp microk8s

通过运行以下命令设置本地路径 provisioner

$ curl https://raw.githubusercontent.com/rancher/local-path-provisioner/v0.0.23/deploy/local-path-storage.yaml | sed 's/^  name: local-path$/  name: mdx-local-path/g' | microk8s kubectl apply -f -

在环境变量中导出 NGC API KEY

$ export NGC_API_KEY=<value>

删除任何预先存在的密钥,并使用您有效的 NGC_API_KEY 设置所需的密钥

$ microk8s kubectl delete secret --ignore-not-found ngc-docker-reg-secret
$ microk8s kubectl delete secret --ignore-not-found ngc-api-key-secret
$ microk8s kubectl create secret docker-registry ngc-docker-reg-secret --docker-username='$oauthtoken' --docker-password=$NGC_API_KEY --docker-server=nvcr.io
$ microk8s kubectl create secret generic ngc-api-key-secret --from-literal=NGC_API_KEY=$NGC_API_KEY

1. 下载并安装 Helm Chart#

使用以下命令创建一个新目录并将 Helm Chart 下载到其中

$ export HELM_VERSION=1.2.0
$ mkdir a2f-3d-nim/ && cd a2f-3d-nim/
$ microk8s helm fetch https://helm.ngc.nvidia.com/nim/nvidia/charts/audio2face-3d-"$HELM_VERSION".tgz --username='$oauthtoken' --password=$NGC_API_KEY
$ tar xvf audio2face-3d-$HELM_VERSION.tgz

Helm Chart 包括 A2F-3D 服务的可观测性功能。有关可观测性的更多详细信息,请参阅此页面:可观测性

有关更新配置的更多信息

配置映射可以在 audio2face-3d/charts/a2f/values.yaml 文件中找到,从第 140 行开始。它是 A2F-3D NIM 手动容器部署和配置 中使用的相同 3 个 YAML 文件的串联,如下所示

configs:
  advanced_config.yaml
    ...
  deployment_config.yaml
    ...
  stylization_config.yaml
    ...

您可以直接在该文件中更新值。对于不同的模型,请使用以下三个样式化文件的内容

claire_stylization_config.yaml
# These are the default emotions applied at the beginning of any audio clip, and it also defines the default preferred emotion.
# Their values range from 0.0 to 1.0
default_beginning_emotions:
  amazement: 0.0
  anger: 0.0
  cheekiness: 0.0
  disgust: 0.0
  fear: 0.0
  grief: 0.0
  joy: 0.0
  outofbreath: 0.0
  pain: 0.0
  sadness: 0.0

a2e:
  enabled: true # Enable audio2emotion, ai-generated audio-driven emotion
  live_transition_time: 0.5 # Controls the smoothness of the output transition toward the target value across frames; higher values result in smoother transitions. Each frame updates at a rate of <frame time length> / <live transition time> (capped at 1.0) toward the raw result.
  post_processing_params:
    emotion_contrast: 1.0 # Increases the spread between emotion values by pushing them higher or lower
    emotion_strength: 0.6 # Sets the strength of generated emotions relative to neutral emotion
    enable_preferred_emotion: true # Activate blending preferred emotion with auto-emotion
    live_blend_coef: 0.7 # Coefficient for exponential smoothing of emotion
    max_emotions: 3 # Sets a firm limit on the quantity of emotion sliders engaged by A2E - emotions with the highest weight will be prioritized
    preferred_emotion_strength: 0.5 # Sets the strength of the preferred emotion (if is loaded) relative to generated emotions

a2f:
  # A2F model, can be one of james_v2.3, claire_v2.3 or mark_v2.3
  inference_model_id: claire_v2.3
  blendshape_id: claire_topo1_v2.1

  face_params:
    eyelid_offset: 0.0 # Adjusts the default pose of eyelid open-close
    face_mask_level: 0.6 # Determines the boundary between the upper and lower regions of the face
    face_mask_softness: 0.0085 # Determines how smoothly the upper and lower face regions blend on the boundary
    input_strength: 1.0 # Controls the magnitude of the input audio
    lip_close_offset: 0.0 # Adjusts the default pose of lip close-open
    lower_face_smoothing: 0.006 # Applies temporal smoothing to the lower face motion
    lower_face_strength: 1.25 # Controls the range of motion on the lower regions of the face
    skin_strength: 1.0 # Controls the range of motion of the skin
    upper_face_smoothing: 0.001 # Applies temporal smoothing to the upper face motion
    upper_face_strength: 1.0 # Controls the range of motion on the upper regions of the face

  blendshape_params: # Modulates the effect of each blendshapes. Gain * w + offset
    enable_clamping_bs_weight: false

    # Multiplier for each blendshape output. This list depends on the blendshape model.
    weight_multipliers:
      EyeBlinkLeft: 1.0
      EyeLookDownLeft: 1.0
      EyeLookInLeft: 1.0
      EyeLookOutLeft: 1.0
      EyeLookUpLeft: 1.0
      EyeSquintLeft: 1.0
      EyeWideLeft: 1.0
      EyeBlinkRight: 1.0
      EyeLookDownRight: 1.0
      EyeLookInRight: 1.0
      EyeLookOutRight: 1.0
      EyeLookUpRight: 1.0
      EyeSquintRight: 1.0
      EyeWideRight: 1.0
      JawForward: 1.0
      JawLeft: 1.0
      JawRight: 1.0
      JawOpen: 1.0
      MouthClose: 1.0
      MouthFunnel: 1.0
      MouthPucker: 1.0
      MouthLeft: 1.0
      MouthRight: 1.0
      MouthSmileLeft: 1.0
      MouthSmileRight: 1.0
      MouthFrownLeft: 1.0
      MouthFrownRight: 1.0
      MouthDimpleLeft: 1.0
      MouthDimpleRight: 1.0
      MouthStretchLeft: 1.0
      MouthStretchRight: 1.0
      MouthRollLower: 1.0
      MouthRollUpper: 1.0
      MouthShrugLower: 1.0
      MouthShrugUpper: 1.0
      MouthPressLeft: 1.0
      MouthPressRight: 1.0
      MouthLowerDownLeft: 1.0
      MouthLowerDownRight: 1.0
      MouthUpperUpLeft: 1.0
      MouthUpperUpRight: 1.0
      BrowDownLeft: 1.0
      BrowDownRight: 1.0
      BrowInnerUp: 1.0
      BrowOuterUpLeft: 1.0
      BrowOuterUpRight: 1.0
      CheekPuff: 1.0
      CheekSquintLeft: 1.0
      CheekSquintRight: 1.0
      NoseSneerLeft: 1.0
      NoseSneerRight: 1.0
      TongueOut: 1.0

    # Constant offset for each blendshape output. This list depends on the blendshape model.
    weight_offsets:
      EyeBlinkLeft: 0.0
      EyeLookDownLeft: 0.0
      EyeLookInLeft: 0.0
      EyeLookOutLeft: 0.0
      EyeLookUpLeft: 0.0
      EyeSquintLeft: 0.0
      EyeWideLeft: 0.0
      EyeBlinkRight: 0.0
      EyeLookDownRight: 0.0
      EyeLookInRight: 0.0
      EyeLookOutRight: 0.0
      EyeLookUpRight: 0.0
      EyeSquintRight: 0.0
      EyeWideRight: 0.0
      JawForward: 0.0
      JawLeft: 0.0
      JawRight: 0.0
      JawOpen: 0.0
      MouthClose: 0.0
      MouthFunnel: 0.0
      MouthPucker: 0.0
      MouthLeft: 0.0
      MouthRight: 0.0
      MouthSmileLeft: 0.0
      MouthSmileRight: 0.0
      MouthFrownLeft: 0.0
      MouthFrownRight: 0.0
      MouthDimpleLeft: 0.0
      MouthDimpleRight: 0.0
      MouthStretchLeft: 0.0
      MouthStretchRight: 0.0
      MouthRollLower: 0.0
      MouthRollUpper: 0.0
      MouthShrugLower: 0.0
      MouthShrugUpper: 0.0
      MouthPressLeft: 0.0
      MouthPressRight: 0.0
      MouthLowerDownLeft: 0.0
      MouthLowerDownRight: 0.0
      MouthUpperUpLeft: 0.0
      MouthUpperUpRight: 0.0
      BrowDownLeft: 0.0
      BrowDownRight: 0.0
      BrowInnerUp: 0.0
      BrowOuterUpLeft: 0.0
      BrowOuterUpRight: 0.0
      CheekPuff: 0.0
      CheekSquintLeft: 0.0
      CheekSquintRight: 0.0
      NoseSneerLeft: 0.0
      NoseSneerRight: 0.0
      TongueOut: 0.0
james_stylization_config.yaml
# These are the default emotions applied at the beginning of any audio clip.
# Their values range from 0.0 to 1.0
default_beginning_emotions:
  amazement: 0.0
  anger: 0.0
  cheekiness: 0.0
  disgust: 0.0
  fear: 0.0
  grief: 0.0
  joy: 0.0
  outofbreath: 0.0
  pain: 0.0
  sadness: 0.0

a2e:
  enabled: true
  live_transition_time: 0.5
  post_processing_params:
    emotion_contrast: 1.0 # Increases the spread between emotion values by pushing them higher or lower
    emotion_strength: 0.6 # Sets the strength of generated emotions relative to neutral emotion
    enable_preferred_emotion: true # Activate blending preferred emotion with auto-emotion
    live_blend_coef: 0.7 # Coefficient for exponential smoothing of emotion
    max_emotions: 3 # Sets a firm limit on the quantity of emotion sliders engaged by A2E - emotions with the highest weight will be prioritized
    preferred_emotion_strength: 0.5 # Sets the strength of the preferred emotion (if is loaded) relative to generated emotions

a2f:
  # A2F model, can be one of james_v2.3, claire_v2.3 or mark_v2.3
  inference_model_id: james_v2.3
  blendshape_id: james_topo2_v2.2

  face_params:
    eyelid_offset: 0.06 # Adjusts the default pose of eyelid open-close
    face_mask_level: 0.6 # Determines the boundary between the upper and lower regions of the face
    face_mask_softness: 0.0085 # Determines how smoothly the upper and lower face regions blend on the boundary
    input_strength: 1.0 # Controls the magnitude of the input audio
    lip_close_offset: -0.02 # Adjusts the default pose of lip close-open
    lower_face_smoothing: 0.006 # Applies temporal smoothing to the lower face motion
    lower_face_strength: 1.2 # Controls the range of motion on the lower regions of the face
    skin_strength: 1.0 # Controls the range of motion of the skin
    upper_face_smoothing: 0.001 # Applies temporal smoothing to the upper face motion
    upper_face_strength: 1.0 # Controls the range of motion on the upper regions of the face

  blendshape_params: # Modulates the effect of each blendshapes. Gain * w + offset
    enable_clamping_bs_weight: false

    weight_multipliers:
      EyeBlinkLeft: 1.0
      EyeLookDownLeft: 1.0
      EyeLookInLeft: 1.0
      EyeLookOutLeft: 1.0
      EyeLookUpLeft: 1.0
      EyeSquintLeft: 1.0
      EyeWideLeft: 1.0
      EyeBlinkRight: 1.0
      EyeLookDownRight: 1.0
      EyeLookInRight: 1.0
      EyeLookOutRight: 1.0
      EyeLookUpRight: 1.0
      EyeSquintRight: 1.0
      EyeWideRight: 1.0
      JawForward: 1.0
      JawLeft: 1.0
      JawRight: 1.0
      JawOpen: 1.0
      MouthClose: 1.0
      MouthFunnel: 1.0
      MouthPucker: 1.0
      MouthLeft: 1.0
      MouthRight: 1.0
      MouthSmileLeft: 1.0
      MouthSmileRight: 1.0
      MouthFrownLeft: 1.0
      MouthFrownRight: 1.0
      MouthDimpleLeft: 1.0
      MouthDimpleRight: 1.0
      MouthStretchLeft: 1.0
      MouthStretchRight: 1.0
      MouthRollLower: 1.0
      MouthRollUpper: 1.0
      MouthShrugLower: 1.0
      MouthShrugUpper: 1.0
      MouthPressLeft: 1.0
      MouthPressRight: 1.0
      MouthLowerDownLeft: 1.0
      MouthLowerDownRight: 1.0
      MouthUpperUpLeft: 1.0
      MouthUpperUpRight: 1.0
      BrowDownLeft: 1.0
      BrowDownRight: 1.0
      BrowInnerUp: 1.0
      BrowOuterUpLeft: 1.0
      BrowOuterUpRight: 1.0
      CheekPuff: 1.0
      CheekSquintLeft: 1.0
      CheekSquintRight: 1.0
      NoseSneerLeft: 1.0
      NoseSneerRight: 1.0
      TongueOut: 1.0

    weight_offsets:
      EyeBlinkLeft: 0.0
      EyeLookDownLeft: 0.0
      EyeLookInLeft: 0.0
      EyeLookOutLeft: 0.0
      EyeLookUpLeft: 0.0
      EyeSquintLeft: 0.0
      EyeWideLeft: 0.0
      EyeBlinkRight: 0.0
      EyeLookDownRight: 0.0
      EyeLookInRight: 0.0
      EyeLookOutRight: 0.0
      EyeLookUpRight: 0.0
      EyeSquintRight: 0.0
      EyeWideRight: 0.0
      JawForward: 0.0
      JawLeft: 0.0
      JawRight: 0.0
      JawOpen: 0.0
      MouthClose: 0.0
      MouthFunnel: 0.0
      MouthPucker: 0.0
      MouthLeft: 0.0
      MouthRight: 0.0
      MouthSmileLeft: 0.0
      MouthSmileRight: 0.0
      MouthFrownLeft: 0.0
      MouthFrownRight: 0.0
      MouthDimpleLeft: 0.0
      MouthDimpleRight: 0.0
      MouthStretchLeft: 0.0
      MouthStretchRight: 0.0
      MouthRollLower: 0.0
      MouthRollUpper: 0.0
      MouthShrugLower: 0.0
      MouthShrugUpper: 0.0
      MouthPressLeft: 0.0
      MouthPressRight: 0.0
      MouthLowerDownLeft: 0.0
      MouthLowerDownRight: 0.0
      MouthUpperUpLeft: 0.0
      MouthUpperUpRight: 0.0
      BrowDownLeft: 0.0
      BrowDownRight: 0.0
      BrowInnerUp: 0.0
      BrowOuterUpLeft: 0.0
      BrowOuterUpRight: 0.0
      CheekPuff: 0.0
      CheekSquintLeft: 0.0
      CheekSquintRight: 0.0
      NoseSneerLeft: 0.0
      NoseSneerRight: 0.0
      TongueOut: 0.0
mark_stylization_config.yaml
# These are the default emotions applied at the beginning of any audio clip.
# Their values range from 0.0 to 1.0
default_beginning_emotions:
  amazement: 0.0
  anger: 0.0
  cheekiness: 0.0
  disgust: 0.0
  fear: 0.0
  grief: 0.0
  joy: 0.0
  outofbreath: 0.0
  pain: 0.0
  sadness: 0.0

a2e:
  enabled: true
  live_transition_time: 0.5
  post_processing_params:
    emotion_contrast: 1.0 # Increases the spread between emotion values by pushing them higher or lower
    emotion_strength: 0.6 # Sets the strength of generated emotions relative to neutral emotion
    enable_preferred_emotion: true # Activate blending preferred emotion with auto-emotion
    live_blend_coef: 0.7 # Coefficient for exponential smoothing of emotion
    max_emotions: 3 # Sets a firm limit on the quantity of emotion sliders engaged by A2E - emotions with the highest weight will be prioritized
    preferred_emotion_strength: 0.5 # Sets the strength of the preferred emotion (if is loaded) relative to generated emotions

a2f:
  # A2F model, can be one of james_v2.3, claire_v2.3 or mark_v2.3
  inference_model_id: mark_v2.3
  blendshape_id: mark_topo1_v2.1

  face_params:
    eyelid_offset: 0.06 # Adjusts the default pose of eyelid open-close
    face_mask_level: 0.6 # Determines the boundary between the upper and lower regions of the face
    face_mask_softness: 0.0085 # Determines how smoothly the upper and lower face regions blend on the boundary
    input_strength: 1.3 # Controls the magnitude of the input audio
    lip_close_offset: -0.03 # Adjusts the default pose of lip close-open
    lower_face_smoothing: 0.0023 # Applies temporal smoothing to the lower face motion
    lower_face_strength: 1.4 # Controls the range of motion on the lower regions of the face
    skin_strength: 1.1 # Controls the range of motion of the skin
    upper_face_smoothing: 0.001 # Applies temporal smoothing to the upper face motion
    upper_face_strength: 1.0 # Controls the range of motion on the upper regions of the face

  blendshape_params: # Modulates the effect of each blendshapes. Gain * w + offset
    enable_clamping_bs_weight: false

    weight_multipliers:
      EyeBlinkLeft: 1.0
      EyeLookDownLeft: 1.0
      EyeLookInLeft: 1.0
      EyeLookOutLeft: 1.0
      EyeLookUpLeft: 1.0
      EyeSquintLeft: 1.0
      EyeWideLeft: 1.0
      EyeBlinkRight: 1.0
      EyeLookDownRight: 1.0
      EyeLookInRight: 1.0
      EyeLookOutRight: 1.0
      EyeLookUpRight: 1.0
      EyeSquintRight: 1.0
      EyeWideRight: 1.0
      JawForward: 1.0
      JawLeft: 1.0
      JawRight: 1.0
      JawOpen: 1.0
      MouthClose: 1.0
      MouthFunnel: 1.0
      MouthPucker: 1.0
      MouthLeft: 1.0
      MouthRight: 1.0
      MouthSmileLeft: 1.0
      MouthSmileRight: 1.0
      MouthFrownLeft: 1.0
      MouthFrownRight: 1.0
      MouthDimpleLeft: 1.0
      MouthDimpleRight: 1.0
      MouthStretchLeft: 1.0
      MouthStretchRight: 1.0
      MouthRollLower: 1.0
      MouthRollUpper: 1.0
      MouthShrugLower: 1.0
      MouthShrugUpper: 1.0
      MouthPressLeft: 1.0
      MouthPressRight: 1.0
      MouthLowerDownLeft: 1.0
      MouthLowerDownRight: 1.0
      MouthUpperUpLeft: 1.0
      MouthUpperUpRight: 1.0
      BrowDownLeft: 1.0
      BrowDownRight: 1.0
      BrowInnerUp: 1.0
      BrowOuterUpLeft: 1.0
      BrowOuterUpRight: 1.0
      CheekPuff: 1.0
      CheekSquintLeft: 1.0
      CheekSquintRight: 1.0
      NoseSneerLeft: 1.0
      NoseSneerRight: 1.0
      TongueOut: 1.0

    weight_offsets:
      EyeBlinkLeft: 0.0
      EyeLookDownLeft: 0.0
      EyeLookInLeft: 0.0
      EyeLookOutLeft: 0.0
      EyeLookUpLeft: 0.0
      EyeSquintLeft: 0.0
      EyeWideLeft: 0.0
      EyeBlinkRight: 0.0
      EyeLookDownRight: 0.0
      EyeLookInRight: 0.0
      EyeLookOutRight: 0.0
      EyeLookUpRight: 0.0
      EyeSquintRight: 0.0
      EyeWideRight: 0.0
      JawForward: 0.0
      JawLeft: 0.0
      JawRight: 0.0
      JawOpen: 0.0
      MouthClose: 0.0
      MouthFunnel: 0.0
      MouthPucker: 0.0
      MouthLeft: 0.0
      MouthRight: 0.0
      MouthSmileLeft: 0.0
      MouthSmileRight: 0.0
      MouthFrownLeft: 0.0
      MouthFrownRight: 0.0
      MouthDimpleLeft: 0.0
      MouthDimpleRight: 0.0
      MouthStretchLeft: 0.0
      MouthStretchRight: 0.0
      MouthRollLower: 0.0
      MouthRollUpper: 0.0
      MouthShrugLower: 0.0
      MouthShrugUpper: 0.0
      MouthPressLeft: 0.0
      MouthPressRight: 0.0
      MouthLowerDownLeft: 0.0
      MouthLowerDownRight: 0.0
      MouthUpperUpLeft: 0.0
      MouthUpperUpRight: 0.0
      BrowDownLeft: 0.0
      BrowDownRight: 0.0
      BrowInnerUp: 0.0
      BrowOuterUpLeft: 0.0
      BrowOuterUpRight: 0.0
      CheekPuff: 0.0
      CheekSquintLeft: 0.0
      CheekSquintRight: 0.0
      NoseSneerLeft: 0.0
      NoseSneerRight: 0.0
      TongueOut: 0.0

如果 A2F-3D 服务已在运行 并且您需要更新配置映射,您可以

  1. 将配置映射导出到文件,例如 configmap.yaml

$ microk8s kubectl get configmap a2f-configs-cm -o yaml > configmap.yaml
  1. 使用您喜欢的文本编辑器编辑文件。

$ nano configmap.yaml
  1. 应用更新后的配置映射。

$ microk8s kubectl apply -f configmap.yaml
  1. 删除 Audio2Face-3D Pod 以重启它

$ microk8s kubectl delete pods <audio2face_pod_name>

可以通过运行以下命令找到 <audio2face_pod_name>

$ microk8s kubectl get pods
NAME                                  READY   STATUS             RESTARTS       AGE
a2f-a2f-deployment-xxx-xxx            1/1     Running            0              1h

在这里:a2f-a2f-deployment-xxx-xxx

然后,您可以通过执行以下命令安装 Helm Chart

$ microk8s helm install a2f-3d-nim audio2face-3d/

2. 可选 - 公开 Pod IP#

您需要公开 Pod ID,以便从另一台机器访问 A2F-3D NIM。如果这不是您的用例,您可以跳过此步骤。

以下 yaml 文件定义了 Kubernetes 集群中外部系统和 a2f-a2f-deployment-a2f-service Pod 之间通信的端口集。阅读注释以了解文件结构。

service_expose.yaml
apiVersion: v1
kind: Service
metadata:
  name: a2f-a2f-deployment-a2f-service
spec:
  type: NodePort
  ports:
    # Port 50010 serves A2F-3D gRPC service.
    - port: 50010 # The port used internally by the Kubernetes cluster for communication.
      targetPort: 50010 # The port on the application (pod) that the service forwards traffic to.
      nodePort: 30010 # The externally accessible port on the node that maps to the service. External traffic to NodeIP:30010 is routed to PodIP:50010.
    # Port 8000 serves A2F-3D NIM Http service.
    - port: 8000
      targetPort: 8000
      nodePort: 30020
    # Port 9464 serves A2F-3D Prometheus Endpoint.
    - port: 9464
      targetPort: 9464
      nodePort: 30030

您可以根据需要调整外部端口,确保它们在 30000–32767 范围内。要应用 YAML 文件并公开指定的端口,请运行以下命令

$ sudo microk8s kubectl apply -f service_expose.yaml

然后您需要删除 Audio2Face-3D Pod 以重启它。

$ microk8s kubectl delete pods <audio2face_pod_name>

可以通过运行以下命令找到 <audio2face_pod_name>

$ microk8s kubectl get pods
NAME                                  READY   STATUS             RESTARTS       AGE
a2f-a2f-deployment-xxx-xxx            1/1     Running            0              1h

在这里:a2f-a2f-deployment-xxx-xxx

3. 检查它是否启动并运行#

执行以下命令以检查应用程序是否已成功部署。请注意,命令输出可能会有所不同。

$ microk8s kubectl get pods
  NAME                                 READY   STATUS    RESTARTS   AGE
  a2f-a2f-deployment-94d89f979-v6n24   0/1     Init:0/1  0          53s

注意

如果您看到状态为 ImagePullBackOff,则重新配置密钥。确保您的 NGC_API_KEY 有效。

注意

如果您看到状态为 Pending,则需要再次设置本地路径 provisioner

$ curl https://raw.githubusercontent.com/rancher/local-path-provisioner/v0.0.23/deploy/local-path-storage.yaml | sed 's/^  name: local-path$/  name: mdx-local-path/g' | microk8s kubectl apply -f -

等待一段时间,直到 STATUS 更改为 Running

要运行客户端应用程序,您将需要外部 IP 和端口进行连接。您可以通过执行以下命令获取此信息

$ microk8s kubectl get svc
  NAME                             TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)                       AGE
  a2f-a2f-deployment-a2f-service   ClusterIP   <ip>            <none>        50010/TCP,9464/TCP,8000/TCP   56m

然后,您可以尝试使用 Audio2Face-3D 进行交互,例如使用提供的示例应用程序

卸载应用程序#

要卸载应用程序,请运行

$ microk8s helm uninstall a2f-3d-nim