website/docs/tasks/manage-gpus
dengyi1996 d76fbb0b27 Update scheduling-gpus.md
privileged mode is not needed on my kubernetes cluster, and it will make other developers confuse.
e.g:
I try to use this example to test whether the keyword "resources->limit" will work.when I set limit:1 with privileged,I can reach all gpus instead of single gpu.

```
kind: Pod
apiVersion: v1
metadata:
  name: gpu-pod-1
spec:
  containers:
  - name: gpu-container-1
    image: tensorflow/tensorflow:latest-gpu
    securityContext:
      privileged: true
    env:
    - name: LD_LIBRARY_PATH
      value: "$LD_LIBRARY_PATH:/usr/lib/nvidia"
    - name: CUDA_HOME
      value: "/usr/local/nvidia"
#    securityContext:
#      privileged: true
    resources:
      limits:
        alpha.kubernetes.io/nvidia-gpu: 1
    volumeMounts:
    - mountPath: /usr/local/nvidia/bin
      name: bin
    - mountPath: /usr/lib/nvidia
      name: lib
  volumes:
  - hostPath:
      path: /usr/local/cuda/bin
    name: bin
  - hostPath:
      path: /var/lib/nvidia-docker/volumes/nvidia_driver/375.26/lib64/
    name: lib
```
it show all gpu devices because of privileged mode
```
[name: "/cpu:0"
device_type: "CPU"
memory_limit: 268435456
locality {
}
incarnation: 3223127178054071976
, name: "/gpu:0"
device_type: "GPU"
memory_limit: 103809024
locality {
  bus_id: 1
}
incarnation: 6184347283432924133
physical_device_desc: "device: 0, name: Quadro K4200, pci bus id: 0000:03:00.0"
, name: "/gpu:1"
device_type: "GPU"
memory_limit: 103809024
locality {
  bus_id: 1
}
incarnation: 1058630844567460797
physical_device_desc: "device: 1, name: Quadro K4200, pci bus id: 0000:04:00.0"
]

```
2017-08-07 16:49:35 -07:00
..
scheduling-gpus.md Update scheduling-gpus.md 2017-08-07 16:49:35 -07:00