HEX
Server: Apache/2.4.65 (Ubuntu)
System: Linux ielts-store-v2 6.8.0-1036-gcp #38~22.04.1-Ubuntu SMP Thu Aug 14 01:19:18 UTC 2025 x86_64
User: root (0)
PHP: 7.2.34-54+ubuntu20.04.1+deb.sury.org+1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: //snap/google-cloud-cli/396/help/man/man1/gcloud_alpha_ai_models_upload.1
.TH "GCLOUD_ALPHA_AI_MODELS_UPLOAD" 1



.SH "NAME"
.HP
gcloud alpha ai models upload \- upload a new model



.SH "SYNOPSIS"
.HP
\f5gcloud alpha ai models upload\fR \fB\-\-container\-image\-uri\fR=\fICONTAINER_IMAGE_URI\fR \fB\-\-display\-name\fR=\fIDISPLAY_NAME\fR [\fB\-\-artifact\-uri\fR=\fIARTIFACT_URI\fR] [\fB\-\-container\-args\fR=[\fIARG\fR,...]] [\fB\-\-container\-command\fR=[\fICOMMAND\fR,...]] [\fB\-\-container\-deployment\-timeout\-seconds\fR=\fICONTAINER_DEPLOYMENT_TIMEOUT_SECONDS\fR] [\fB\-\-container\-env\-vars\fR=[\fIKEY\fR=\fIVALUE\fR,...]] [\fB\-\-container\-grpc\-ports\fR=[\fIPORT\fR,...]] [\fB\-\-container\-health\-probe\-exec\fR=[\fIHEALTH_PROBE_EXEC\fR,...]] [\fB\-\-container\-health\-probe\-period\-seconds\fR=\fICONTAINER_HEALTH_PROBE_PERIOD_SECONDS\fR] [\fB\-\-container\-health\-probe\-timeout\-seconds\fR=\fICONTAINER_HEALTH_PROBE_TIMEOUT_SECONDS\fR] [\fB\-\-container\-health\-route\fR=\fICONTAINER_HEALTH_ROUTE\fR] [\fB\-\-container\-ports\fR=[\fIPORT\fR,...]] [\fB\-\-container\-predict\-route\fR=\fICONTAINER_PREDICT_ROUTE\fR] [\fB\-\-container\-shared\-memory\-size\-mb\fR=\fICONTAINER_SHARED_MEMORY_SIZE_MB\fR] [\fB\-\-container\-startup\-probe\-exec\fR=[\fISTARTUP_PROBE_EXEC\fR,...]] [\fB\-\-container\-startup\-probe\-period\-seconds\fR=\fICONTAINER_STARTUP_PROBE_PERIOD_SECONDS\fR] [\fB\-\-container\-startup\-probe\-timeout\-seconds\fR=\fICONTAINER_STARTUP_PROBE_TIMEOUT_SECONDS\fR] [\fB\-\-description\fR=\fIDESCRIPTION\fR] [\fB\-\-explanation\-metadata\-file\fR=\fIEXPLANATION_METADATA_FILE\fR] [\fB\-\-explanation\-method\fR=\fIEXPLANATION_METHOD\fR] [\fB\-\-explanation\-modality\fR=\fIEXPLANATION_MODALITY\fR;\ default=\f5"MODALITY_UNSPECIFIED"\fR] [\fB\-\-explanation\-nearest\-neighbor\-search\-config\-file\fR=\fIEXPLANATION_NEAREST_NEIGHBOR_SEARCH_CONFIG_FILE\fR] [\fB\-\-explanation\-neighbor\-count\fR=\fIEXPLANATION_NEIGHBOR_COUNT\fR] [\fB\-\-explanation\-path\-count\fR=\fIEXPLANATION_PATH_COUNT\fR] [\fB\-\-explanation\-query\fR=\fIEXPLANATION_QUERY\fR;\ default="PRECISE"] [\fB\-\-explanation\-step\-count\fR=\fIEXPLANATION_STEP_COUNT\fR] [\fB\-\-labels\fR=[\fIKEY\fR=\fIVALUE\fR,...]] [\fB\-\-model\-id\fR=\fIMODEL_ID\fR] [\fB\-\-parent\-model\fR=\fIPARENT_MODEL\fR] [\fB\-\-region\fR=\fIREGION\fR] [\fB\-\-smooth\-grad\-noise\-sigma\fR=\fISMOOTH_GRAD_NOISE_SIGMA\fR] [\fB\-\-smooth\-grad\-noise\-sigma\-by\-feature\fR=[\fIKEY\fR=\fIVALUE\fR,...]] [\fB\-\-smooth\-grad\-noisy\-sample\-count\fR=\fISMOOTH_GRAD_NOISY_SAMPLE_COUNT\fR] [\fB\-\-uris\fR=[\fIURIS\fR,...]] [\fB\-\-version\-aliases\fR=[\fIVERSION_ALIASES\fR,...]] [\fB\-\-version\-description\fR=\fIVERSION_DESCRIPTION\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]



.SH "EXAMPLES"

To upload a model under project \f5example\fR in region \f5us\-central1\fR, run:

.RS 2m
$ gcloud alpha ai models upload \e
    \-\-container\-image\-uri="gcr.io/example/my\-image" \e
    \-\-description=example\-model \-\-display\-name=my\-model \e
    \-\-artifact\-uri='gs://bucket/path' \-\-project=example \e
    \-\-region=us\-central1
.RE



.SH "REQUIRED FLAGS"

.RS 2m
.TP 2m
\fB\-\-container\-image\-uri\fR=\fICONTAINER_IMAGE_URI\fR

URI of the Model serving container file in the Container Registry (e.g.
gcr.io/myproject/server:latest).

.TP 2m
\fB\-\-display\-name\fR=\fIDISPLAY_NAME\fR

Display name of the model.


.RE
.sp

.SH "OPTIONAL FLAGS"

.RS 2m
.TP 2m
\fB\-\-artifact\-uri\fR=\fIARTIFACT_URI\fR

Path to the directory containing the Model artifact and any of its supporting
files.

.TP 2m
\fB\-\-container\-args\fR=[\fIARG\fR,...]

Comma\-separated arguments passed to the command run by the container image. If
not specified and no \f5\-\-command\fR is provided, the container image's
default command is used.

.TP 2m
\fB\-\-container\-command\fR=[\fICOMMAND\fR,...]

Entrypoint for the container image. If not specified, the container image's
default entrypoint is run.

.TP 2m
\fB\-\-container\-deployment\-timeout\-seconds\fR=\fICONTAINER_DEPLOYMENT_TIMEOUT_SECONDS\fR

Deployment timeout in seconds.

.TP 2m
\fB\-\-container\-env\-vars\fR=[\fIKEY\fR=\fIVALUE\fR,...]

List of key\-value pairs to set as environment variables.

.TP 2m
\fB\-\-container\-grpc\-ports\fR=[\fIPORT\fR,...]

Container ports to receive grpc requests at. Must be a number between 1 and
65535, inclusive.

.TP 2m
\fB\-\-container\-health\-probe\-exec\fR=[\fIHEALTH_PROBE_EXEC\fR,...]

Exec specifies the action to take. Used by health probe. An example of this
argument would be ["cat", "/tmp/healthy"].

.TP 2m
\fB\-\-container\-health\-probe\-period\-seconds\fR=\fICONTAINER_HEALTH_PROBE_PERIOD_SECONDS\fR

How often (in seconds) to perform the health probe. Default to 10 seconds.
Minimum value is 1.

.TP 2m
\fB\-\-container\-health\-probe\-timeout\-seconds\fR=\fICONTAINER_HEALTH_PROBE_TIMEOUT_SECONDS\fR

Number of seconds after which the health probe times out. Defaults to 1 second.
Minimum value is 1.

.TP 2m
\fB\-\-container\-health\-route\fR=\fICONTAINER_HEALTH_ROUTE\fR

HTTP path to send health checks to inside the container.

.TP 2m
\fB\-\-container\-ports\fR=[\fIPORT\fR,...]

Container ports to receive http requests at. Must be a number between 1 and
65535, inclusive.

.TP 2m
\fB\-\-container\-predict\-route\fR=\fICONTAINER_PREDICT_ROUTE\fR

HTTP path to send prediction requests to inside the container.

.TP 2m
\fB\-\-container\-shared\-memory\-size\-mb\fR=\fICONTAINER_SHARED_MEMORY_SIZE_MB\fR

The amount of the VM memory to reserve as the shared memory for the model in
megabytes.

.TP 2m
\fB\-\-container\-startup\-probe\-exec\fR=[\fISTARTUP_PROBE_EXEC\fR,...]

Exec specifies the action to take. Used by startup probe. An example of this
argument would be ["cat", "/tmp/healthy"].

.TP 2m
\fB\-\-container\-startup\-probe\-period\-seconds\fR=\fICONTAINER_STARTUP_PROBE_PERIOD_SECONDS\fR

How often (in seconds) to perform the startup probe. Default to 10 seconds.
Minimum value is 1.

.TP 2m
\fB\-\-container\-startup\-probe\-timeout\-seconds\fR=\fICONTAINER_STARTUP_PROBE_TIMEOUT_SECONDS\fR

Number of seconds after which the startup probe times out. Defaults to 1 second.
Minimum value is 1.

.TP 2m
\fB\-\-description\fR=\fIDESCRIPTION\fR

Description of the model.

.TP 2m
\fB\-\-explanation\-metadata\-file\fR=\fIEXPLANATION_METADATA_FILE\fR

Path to a local JSON file that contains the metadata describing the Model's
input and output for explanation.

.TP 2m
\fB\-\-explanation\-method\fR=\fIEXPLANATION_METHOD\fR

Method used for explanation. Accepted values are \f5integrated\-gradients\fR,
\f5xrai\fR and \f5sampled\-shapley\fR.

.TP 2m
\fB\-\-explanation\-modality\fR=\fIEXPLANATION_MODALITY\fR; default=\f5"MODALITY_UNSPECIFIED"\fR

Preset option specifying the modality of the uploaded model, which automatically
configures the distance measurement and feature normalization for the underlying
example index and queries. Accepted values are \f5IMAGE\fR, \f5TEXT\fR and
\f5TABULAR\fR. Should be used only when the explanation method is
\f5examples\fR.

.TP 2m
\fB\-\-explanation\-nearest\-neighbor\-search\-config\-file\fR=\fIEXPLANATION_NEAREST_NEIGHBOR_SEARCH_CONFIG_FILE\fR

Path to a local JSON file that contains the configuration for the generated
index, the semantics are the same as metadata and should match
NearestNeighborSearchConfig. If you specify this parameter, no need to use
\f5explanation\-modality\fR and \f5explanation\-query\fR for preset. Should be
used only when the explanation method is \f5examples\fR.

An example of a JSON config file:

.RS 2m
{
"contentsDeltaUri": "",
"config": {
    "dimensions": 50,
    "approximateNeighborsCount": 10,
    "distanceMeasureType": "SQUARED_L2_DISTANCE",
    "featureNormType": "NONE",
    "algorithmConfig": {
        "treeAhConfig": {
            "leafNodeEmbeddingCount": 1000,
            "leafNodesToSearchPercent": 100
        }
    }
  }
}
.RE

.TP 2m
\fB\-\-explanation\-neighbor\-count\fR=\fIEXPLANATION_NEIGHBOR_COUNT\fR

The number of items to return when querying for examples. Should be used only
when the explanation method is \f5examples\fR.

.TP 2m
\fB\-\-explanation\-path\-count\fR=\fIEXPLANATION_PATH_COUNT\fR

Number of feature permutations to consider when approximating the Shapley values
for explanation.

.TP 2m
\fB\-\-explanation\-query\fR=\fIEXPLANATION_QUERY\fR; default="PRECISE"

Preset option controlling parameters for query speed\-precision trade\-off.
Accepted values are \f5PRECISE\fR and \f5FAST\fR. Should be used only when the
explanation method is \f5examples\fR.

.TP 2m
\fB\-\-explanation\-step\-count\fR=\fIEXPLANATION_STEP_COUNT\fR

Number of steps to approximate the path integral for explanation.

.TP 2m
\fB\-\-labels\fR=[\fIKEY\fR=\fIVALUE\fR,...]

Labels with user\-defined metadata to organize your Models.

Label keys and values can be no longer than 64 characters (Unicode codepoints),
can only contain lowercase letters, numeric characters, underscores and dashes.
International characters are allowed.

See https://goo.gl/xmQnxf for more information and examples of labels.

.TP 2m
\fB\-\-model\-id\fR=\fIMODEL_ID\fR

ID to use for the uploaded Model, which will become the final component of the
model resource name.

.TP 2m
\fB\-\-parent\-model\fR=\fIPARENT_MODEL\fR

Resource name of the model into which to upload the version. Only specify this
field when uploading a new version.

Value should be provided in format:
projects/\f5\fIPROJECT_ID\fR\fR/locations/\f5\fIREGION\fR\fR/models/\f5\fIPARENT_MODEL_ID\fR\fR

.TP 2m

Region resource \- Cloud region to upload model. This represents a Cloud
resource. (NOTE) Some attributes are not given arguments in this group but can
be set in other ways.

To set the \f5project\fR attribute:
.RS 2m
.IP "\(em" 2m
provide the argument \f5\-\-region\fR on the command line with a fully specified
name;
.IP "\(em" 2m
set the property \f5ai/region\fR with a fully specified name;
.IP "\(em" 2m
choose one from the prompted list of available regions with a fully specified
name;
.IP "\(em" 2m
provide the argument \f5\-\-project\fR on the command line;
.IP "\(em" 2m
set the property \f5core/project\fR.
.RE
.sp


.RS 2m
.TP 2m
\fB\-\-region\fR=\fIREGION\fR

ID of the region or fully qualified identifier for the region.

To set the \f5region\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5\-\-region\fR on the command line;
.IP "\(bu" 2m
set the property \f5ai/region\fR;
.IP "\(bu" 2m
choose one from the prompted list of available regions.
.RE
.sp

.RE
.sp
.TP 2m
\fB\-\-smooth\-grad\-noise\-sigma\fR=\fISMOOTH_GRAD_NOISE_SIGMA\fR

Single float value used to add noise to all the features for explanation. Only
applicable to explanation method \f5integrated\-gradients\fR or \f5xrai\fR.

.TP 2m
\fB\-\-smooth\-grad\-noise\-sigma\-by\-feature\fR=[\fIKEY\fR=\fIVALUE\fR,...]

Noise sigma by features for explanation. Noise sigma represents the standard
deviation of the gaussian kernel that will be used to add noise to interpolated
inputs prior to computing gradients. Only applicable to explanation method
\f5integrated\-gradients\fR or \f5xrai\fR.

.TP 2m
\fB\-\-smooth\-grad\-noisy\-sample\-count\fR=\fISMOOTH_GRAD_NOISY_SAMPLE_COUNT\fR

Number of gradient samples used for approximation at explanation. Only
applicable to explanation method \f5integrated\-gradients\fR or \f5xrai\fR.

.TP 2m
\fB\-\-uris\fR=[\fIURIS\fR,...]

Cloud Storage bucket paths where training data is stored. Should be used only
when the explanation method is \f5examples\fR.

.TP 2m
\fB\-\-version\-aliases\fR=[\fIVERSION_ALIASES\fR,...]

Aliases used to reference a model version instead of auto\-generated version ID.
The aliases mentioned in the flag will replace the aliases set in the model.

.TP 2m
\fB\-\-version\-description\fR=\fIVERSION_DESCRIPTION\fR

Description of the model version.


.RE
.sp

.SH "GCLOUD WIDE FLAGS"

These flags are available to all commands: \-\-access\-token\-file, \-\-account,
\-\-billing\-project, \-\-configuration, \-\-flags\-file, \-\-flatten,
\-\-format, \-\-help, \-\-impersonate\-service\-account, \-\-log\-http,
\-\-project, \-\-quiet, \-\-trace\-token, \-\-user\-output\-enabled,
\-\-verbosity.

Run \fB$ gcloud help\fR for details.



.SH "NOTES"

This command is currently in alpha and might change without notice. If this
command fails with API permission errors despite specifying the correct project,
you might be trying to access an API with an invitation\-only early access
allowlist. These variants are also available:

.RS 2m
$ gcloud ai models upload
.RE

.RS 2m
$ gcloud beta ai models upload
.RE