# 5. マネージド GPU クラスターでの GPU を使用したアプリケーションのデプロイ

{% stepper %}
{% step %}
**ステップ 1:** 次のコマンドで GPU の構成を確認します。

```
kubectl get nodes -o json | jq '.items[].metadata.labels'
```

**例：**&#x4E0B;の図は、Metal Cloud GPU H100 を使用するワーカー、構成戦略：all-disable、ステータス：success を示しています。

<figure><img src="/files/S3exKihLNlpLOySEMHFp" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**ステップ 2：**&#x30EF;ーカーの GPU インスタンスの設定を確認するには、ノードに ssh で接続し、次のコマンドを入力します。

```
Nvidia-smi
```

以下の例は、GPU ドライバーが正常にインストールされ、8 つの GPU モード None で動作していることを示しています。

<figure><img src="/files/cIMYnlHInbT91JLJSJMU" alt=""><figcaption></figcaption></figure>

**GPU を使用したアプリケーションの実装例**

```
#Syntax:  
nvidia.com/gpu: <number-of-GPUs> 
#Example:  
nvidia.com/gpu: 1 
 
#Example deployment using GPU 
apiVersion: apps/v1 
kind: Deployment 
metadata: 
  name: example-gpu-app 
spec: 
  replicas: 1 
  selector: 
    matchLabels: 
      component: gpu-app 
  template: 
    metadata: 
      labels: 
        component: gpu-app 
    spec: 
      containers: 
        - name: gpu-container 
          securityContext: 
            capabilities: 
              add: 
                - SYS_ADMIN 
          resources: 
            limits: 
              nvidia.com/gpu: 1 
          image: nvidia/samples:dcgmproftester-2.0.10-cuda11.0-ubuntu18.04 
          command: ["/bin/sh", "-c"] 
          args: 
            - while true; do /usr/bin/dcgmproftester11 --no-dcgm-validation -t 1004 -d 300; sleep 30; 
```

{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ai-docs.fptcloud.com/ai-factory-guideline-jp/fpt-gpu-cloud/gpu-cluster/gpu-cluster-managed-k8s-with-metal-cloud/chtoriaru/5-manjido-gpu-kurasutdeno-gpu-woshitaapurikshonnodepuroi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
