NCP-AII exam dumps

NCP-AII practice question 120 of 146

NVIDIA-Certified Professional AI Infrastructure. Professional level, NVIDIA. Free question with the correct answer and a full explanation.

NCP-AII Question 120

Select 3

You are tasked with deploying a containerized AI workload on a server equipped with NVIDIA GPUs. You need to ensure that the container has access to the GPUs for accelerated computation. Which steps are required to correctly run a Docker container with NVIDIA GPU support?

  1. A

    Install the NVIDIA Container Toolkit on the host machine.

  2. B

    Use the '--runtime=nvidia' or '--gpus' flag when running the Docker container.

  3. C

    Ensure the NVIDIA driver is installed and matches the GPU model on the host machine.

  4. D

    Modify the Dockerfile to include the NVIDIA driver installation commands.

  5. E

    Use the '--privileged' flag to grant the container access to the GPU hardware.

Show answer and explanation

Correct answers: A, B, C

Explanation

To run a Docker container with NVIDIA GPU support, the NVIDIA Container Toolkit must be installed on the host machine, the appropriate NVIDIA driver must be configured, and GPUs must be allocated to the container using the '--runtime=nvidia' (deprecated) or '--gpus' flag. Modifying the Dockerfile for driver installation or using '--privileged' are not necessary and may introduce security or compatibility issues.

  • A. Correct.

    Correct: The NVIDIA Container Toolkit is necessary to enable Docker containers to access NVIDIA GPUs on the host machine.

  • B. Correct.

    Correct: The '--runtime=nvidia' (deprecated) or '--gpus' flag is required to explicitly allocate GPUs to the container.

  • C. Correct.

    Correct: The NVIDIA driver must be installed on the host machine and compatible with the GPU to enable GPU functionality.

  • D. Incorrect.

    Incorrect: The NVIDIA driver should not be installed inside the container; it must be present on the host machine.

  • E. Incorrect.

    Incorrect: The '--privileged' flag is not required to access GPUs and is considered a security risk unless absolutely necessary.

Timed practice exam

Take a NCP-AII practice test under exam conditions

65 questions in 90 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam