d76fbb0b279745ede9036bf393c7b9b9a94758a9
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"
]
```
Add Buffer case study. Updates to Ancestry and Wink case study. Updates to Case Study index. Sizes fixes from logo images. (#4568)
Add Buffer case study. Updates to Ancestry and Wink case study. Updates to Case Study index. Sizes fixes from logo images. (#4568)
…
…
…
Instructions for Contributing to the Kubernetes Documentation
Welcome! We are very pleased you want to contribute to the Kubernetes documentation.
You can click the Fork button in the upper-right area of the screen to create a copy of this repository in your GitHub account called a fork. Make any changes you want in your fork, and when you are ready to send those changes to us, go to your fork and create a new pull request to let us know about it.
For more information about contributing to the Kubernetes documentation, see:
- Contributing to the Kubernetes Documentation
- Creating a Documentation Pull Request
- Writing a New Topic
- Staging Your Documentation Changes
- Using Page Templates
- Documentation Style Guide
Thank you!
Kubernetes thrives on community participation, and we really appreciate your contributions to our site and our documentation!
Languages
HTML
78.8%
CSS
9.6%
JavaScript
5%
Go
2.4%
Python
2.1%
Other
2.1%