Courseiva

PMLE Scaling Prototypes into ML Models Practice Question

You are preparing to deploy a trained scikit-learn model to Vertex AI for online prediction. You need to create a custom container that serves the model. Which two of the following steps are required to ensure the container works with Vertex AI? (Choose two.)

⚠ Common exam trap

The trap here is assuming that a /health endpoint or non-root user is required, when the actual requirements are listening on the correct port and providing model artifacts.

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

✓

Include the model artifacts in the container image or ensure they are accessible at runtime.

For a custom container to work with Vertex AI, it must listen on the port specified by the AIP_HTTP_PORT environment variable and have access to the model artifacts. These are the two essential steps. Other aspects like health endpoints, SDK usage, or non-root user are optional or best practices but not mandatory for the container to serve predictions on Vertex AI.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Ensure the container runs as a non-root user for security.

    Why it's wrong here

    Running as a non-root user is a security best practice, but it is not a requirement for Vertex AI to function. Vertex AI does not enforce non-root execution. While it is recommended for production, the container can run as root and still serve predictions. This is a security consideration, not a functional requirement for deployment on Vertex AI.

  • ✓

    Include the model artifacts in the container image or ensure they are accessible at runtime.

    Why this is correct

    The container must have access to the trained model artifacts to perform predictions. You can either bake the model into the image or mount it from a Cloud Storage location at runtime. Without the model, the container cannot serve predictions. Vertex AI expects the model to be loaded when the container starts, so providing the artifacts is essential for a functional deployment.

  • ✓

    Implement a web server that listens on the port specified by the AIP_HTTP_PORT environment variable.

    Why this is correct

    Vertex AI sets the AIP_HTTP_PORT environment variable to tell the container which port to listen on for HTTP requests. The container must read this variable and bind its web server to that port. If it listens on a different port, Vertex AI cannot route prediction requests to it, causing the deployment to fail health checks. This is a mandatory requirement for custom containers on Vertex AI.

  • ✗

    Expose a /health endpoint that returns a 200 status code.

    Why it's wrong here

    While a health endpoint is good practice, Vertex AI does not require a specific /health endpoint. It uses its own health checks by sending requests to the container. The container must respond to the health check requests on the specified port, but the path and implementation are up to you. You can implement any endpoint that returns a successful status for the health check, but it's not a mandatory specific path like /health.

  • ✗

    Use the Vertex AI SDK to build and push the container image.

    Why it's wrong here

    The Vertex AI SDK is not required to build and push the container image. You can use standard Docker commands to build the image and push it to Google Container Registry or Artifact Registry. The SDK is used for managing Vertex AI resources, but container image creation is independent. Using the SDK is optional and not a requirement for the container to work with Vertex AI.

About these practice questions

This PMLE question is part of Courseiva's 775-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Google Cloud exam blueprint

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.