ModelContainerSpec class final
Specification of a container for serving predictions. Some fields in this message correspond to fields in the Kubernetes Container v1 core specification.
- Inheritance
-
- Object
- ProtoMessage
- ModelContainerSpec
Constructors
-
ModelContainerSpec({required String imageUri, List<
String> command = const [], List<String> args = const [], List<EnvVar> env = const [], List<Port> ports = const [], String predictRoute = '', String healthRoute = '', String invokeRoutePrefix = '', List<Port> grpcPorts = const [], Duration? deploymentTimeout, Probe? startupProbe, Probe? healthProbe, Probe? livenessProbe}) - ModelContainerSpec.fromJson(Object? j)
-
factory
Properties
-
args
→ List<
String> -
Immutable. Specifies arguments for the command that runs when the container
starts. This overrides the container's
CMD. Specify this field as an array of executable and arguments, similar to a DockerCMD's "default parameters" form.final -
command
→ List<
String> -
Immutable. Specifies the command that runs when the container starts. This
overrides the container's
ENTRYPOINT.
Specify this field as an array of executable and arguments, similar to a
Docker
ENTRYPOINT's "exec" form, not its "shell" form.final - deploymentTimeout → Duration?
-
Immutable. Deployment timeout.
Limit for deployment timeout is 2 hours.
final
-
env
→ List<
EnvVar> -
Immutable. List of environment variables to set in the container. After the
container starts running, code running in the container can read these
environment variables.
final
-
grpcPorts
→ List<
Port> -
Immutable. List of ports to expose from the container. Vertex AI sends gRPC
prediction requests that it receives to the first port on this list. Vertex
AI also sends liveness and health checks to this port.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- healthProbe → Probe?
-
Immutable. Specification for Kubernetes readiness probe.
final
- healthRoute → String
-
Immutable. HTTP path on the container to send health checks to. Vertex AI
intermittently sends GET requests to this path on the container's IP
address and port to check that the container is healthy. Read more about
health
checks.
final
- imageUri → String
-
Required. Immutable. URI of the Docker image to be used as the custom
container for serving predictions. This URI must identify an image in
Artifact Registry or Container Registry. Learn more about the container
publishing
requirements,
including permissions requirements for the Vertex AI Service Agent.
final
- invokeRoutePrefix → String
-
Immutable. Invoke route prefix for the custom container. "/*" is the only
supported value right now. By setting this field, any non-root route on
this model will be accessible with
PredictionService.Invokeeg: "/invoke/foo/bar".final - livenessProbe → Probe?
-
Immutable. Specification for Kubernetes liveness probe.
final
-
ports
→ List<
Port> -
Immutable. List of ports to expose from the container. Vertex AI sends any
prediction requests that it receives to the first port on this list. Vertex
AI also sends
liveness and health
checks
to this port.
final
- predictRoute → String
-
Immutable. HTTP path on the container to send prediction requests to.
Vertex AI forwards requests sent using
projects.locations.endpoints.predictto this path on the container's IP address and port. Vertex AI then returns the container's response in the API response.final - qualifiedName → String
-
The fully qualified name of this message, i.e.,
google.protobuf.Durationorgoogle.rpc.ErrorInfo.finalinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
Immutable. The amount of the VM memory to reserve as the shared memory for
the model in megabytes.
final
- startupProbe → Probe?
-
Immutable. Specification for Kubernetes startup probe.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Object -
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- fullyQualifiedName → const String