問題文
A site keeps hitting the failure where containers lose their accelerators after an unrelated change on the host. They want a way of passing devices in that survives a container update. Which approach does that, and why?
選択肢
- Grant the container privileged access, which makes the device access permanent across updates, because a privileged container is exempt from the checks that drop the device entries.
- Describe the devices in the container's own configuration when it is created, so that an update to the container carries the device entries with it.
- Keep using the runtime hook but pin the container so that it is never updated, since the loss only happens on an explicit update and a pinned container is therefore immune to the whole class of problem.
- Mount the driver libraries from the host as a volume, which is what the hook does anyway and it therefore survives any later change to the container's configuration.