0
0
MLOpsdevops~20 mins

GPU support in containers in MLOps - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
GPU Container Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding GPU Access in Docker Containers

Which of the following Docker run commands correctly enables GPU support for a container?

Adocker run --enable-gpu nvidia/cuda:latest
Bdocker run --device=/dev/gpu nvidia/cuda:latest
Cdocker run --gpus all nvidia/cuda:latest
Ddocker run --gpu-enabled nvidia/cuda:latest
Attempts:
2 left
💡 Hint

Think about the official Docker flag that grants GPU access.

💻 Command Output
intermediate
2:00remaining
Output of GPU Detection Inside Container

What is the output of running docker run --gpus all nvidia/cuda:11.0-runtime nvidia-smi on a system with one NVIDIA GPU?

ADisplays GPU details including model, driver version, and usage stats
BCommand not found error
CNo devices were found
DPermission denied error
Attempts:
2 left
💡 Hint

Consider what nvidia-smi shows when GPU is accessible.

Configuration
advanced
2:30remaining
Configuring NVIDIA Container Toolkit

Which configuration file must be modified to enable the NVIDIA Container Toolkit to automatically provide GPU support for Docker containers?

A/etc/docker/daemon.json
B/usr/local/nvidia/toolkit.conf
C/etc/nvidia-container-runtime/config.toml
D/etc/docker/docker-compose.yml
Attempts:
2 left
💡 Hint

Think about Docker daemon configuration files.

Troubleshoot
advanced
2:30remaining
Diagnosing GPU Access Failure in Container

You run docker run --gpus all nvidia/cuda:11.0-base nvidia-smi but get the error nvidia-smi: command not found. What is the most likely cause?

AThe <code>--gpus</code> flag is misspelled
BThe host GPU drivers are not installed
CThe Docker daemon is not running
DThe container image does not include the <code>nvidia-smi</code> tool
Attempts:
2 left
💡 Hint

Consider what is inside the container image.

🔀 Workflow
expert
3:00remaining
Steps to Enable GPU Support in Kubernetes Pods

What is the correct order of steps to enable GPU support for a Kubernetes pod?

A3,1,2,4
B1,2,3,4
C2,1,3,4
D1,3,2,4
Attempts:
2 left
💡 Hint

Think about preparing nodes first, then enabling Kubernetes to manage GPUs, then using them in pods.