Courseiva
mediumMultiple Choice

PMLE Practice Question: A team deploys a model on Vertex AI that uses a…

A team deploys a model on Vertex AI that uses a custom prediction routine (CPR) with a dependency on a native library. The container crashes with 'ImportError: libcudart.so.11.0: cannot open shared object file'. How should they resolve this?

⚠ Common exam trap

Google Cloud often tests the misconception that requesting a GPU machine type automatically provides the necessary CUDA libraries, but in reality, the CUDA runtime must be explicitly included in the container image, as the GPU machine type only provides the hardware and driver, not the user-space libraries.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Build a custom container image that includes the CUDA runtime library.

The error 'ImportError: libcudart.so.11.0: cannot open shared object file' indicates that the CUDA runtime library (version 11.0) is missing from the container environment. Since the custom prediction routine (CPR) depends on a native library that requires this CUDA runtime, the correct solution is to build a custom container image that includes the CUDA runtime library. This ensures the shared object is available at runtime, resolving the import error.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    Build a custom container image that includes the CUDA runtime library.

    Why this is correct

    The ImportError shows the CUDA runtime library is absent from the prediction environment. Vertex AI's prebuilt CPR containers do not bundle libcudart, so building a custom image with the CUDA runtime installed supplies the missing native dependency the model needs.

  • ✗

    Submit the model for batch prediction to avoid the error.

    Why it's wrong here

    Batch prediction still executes the same custom container, so the missing libcudart.so.11.0 library triggers the identical ImportError. Batch is tempting because it avoids real-time serving pressure, and it would be correct for large offline scoring jobs where latency and online endpoints are not required.

  • ✗

    Request a GPU machine type for the endpoint.

    Why it's wrong here

    A GPU machine type supplies hardware, not the missing libcudart.so.11.0 CUDA runtime library inside the custom container image. Requesting a GPU is tempting because the absent library is CUDA-related, and a GPU endpoint would be right if the workload needed accelerated inference rather than a repaired image.

  • ✗

    Use a Vertex AI pre-built container for PyTorch instead.

    Why it's wrong here

    A pre-built PyTorch container cannot load the team's custom prediction routine code and its native library dependency, so the ImportError persists. Pre-built containers are tempting because they ship CUDA libraries, and they would be correct for standard framework models without custom CPR code or bespoke native dependencies.

Visual reference

Client Recursive Resolver Root DNS (13 root servers) TLD DNS (.com, .org, …) Authoritative example.com query IP addr answer

About these practice questions

Courseiva writes every PMLE question from scratch — 775 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This PMLE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PMLE exam.