apiVersion: v1
kind: Pod
metadata:
  name: gpu-presuretest-static-pod
  namespace: data-infra
spec:
  containers:
  - name: gpu-container
    image: harbor.xaminim.com/minimax-infra/benchmarktool/gpu:v0.4-cuda12.2 #镜像要提前传过去
    #command: ["sleep"]
    #args: ["infinity"]
    command: ["/bin/sh", "-c"]  # 使用 /bin/sh -c 来执行多条命令
    #args: ["python3 /root/presure-test-tool/start_all.py; touch /root/presurelog/finish; sleep infinity"]
    #args: ["bash /root/presure-test-tool/container_start.sh; sleep infinity"]
    args: ["sleep infinity"]
    resources:
      requests:
        memory: "32Gi"
        cpu: "8"
        nvidia.com/gpu: "8"  # 请求8个GPU
      limits:
        memory: "2048Gi"
        cpu: "200"
        nvidia.com/gpu: "8"  # 请求8个GPU
    volumeMounts:
    - mountPath: /root/presure-test-tool
      name: host-volume
    - mountPath: /root/presurelog
      name: log-volume
  volumes:
  - name: host-volume
    hostPath:
      path: /root/presure-test-tool
  - name: log-volume
    hostPath:
      path: /root/presurelog
  securityContext:
    privileged: true  # 如果需要访问主机的硬件资源，可能需要提升权限
  hostNetwork: true  # 使用主机网络


