提供授权标头以使用Google ml-engine的方法

I've currently got involved in a project using GCP Ml-engine. It's already set & ready so my task is to use it's predict command to leverage the API. The whole project exists in VM instance so I want to know, does it help to get access token in a more concise way? I mean, SDK or something like that, because I didn't find anything useful. If not, what are my options here? JWT?

You might find this useful. https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/ml_engine/online_prediction/predict.py

Especially these lines:

# Create the ML Engine service object.
# To authenticate set the environment variable
# GOOGLE_APPLICATION_CREDENTIALS=<path_to_service_account_file>
service = googleapiclient.discovery.build('ml', 'v1')
name = 'projects/{}/models/{}'.format(project, model)

if version is not None:
    name += '/versions/{}'.format(version)

response = service.projects().predict(
    name=name,
    body={'instances': instances}
).execute()

You can create the service account file from the project IAM page and download the token onto the VM.