I am on Fedora 39 Workstation KDE, and I want to deploy my models to a project within Google Cloud. I have already installed Google Cloud SDK on my system:
spool@fedora:~$ curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-469.0.0-linux-x86_64.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 197M 100 197M 0 0 531k 0 0:06:20 0:06:20 --:--:-- 692k
spool@fedora:~$ tar -xf google-cloud-cli-469.0.0-linux-x86_64.tar.gz
spool@fedora:~$ ./google-cloud-sdk/install.sh
Welcome to the Google Cloud CLI!
To help improve the quality of this product, we collect anonymized usage data
and anonymized stacktraces when crashes are encountered; additional information
is available at <https://cloud.google.com/sdk/usage-statistics>. This data is
handled in accordance with our privacy policy
<https://cloud.google.com/terms/cloud-privacy-notice>. You may choose to opt in this
collection now (by choosing 'Y' at the below prompt), or at any time in the
future by running the following command:
gcloud config set disable_usage_reporting false
Do you want to help improve the Google Cloud CLI (y/N)? N
Your current Google Cloud CLI version is: 469.0.0
The latest available version is: 469.0.0
┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Components │
├───────────────┬──────────────────────────────────────────────────────┬──────────────────────────────┬───────────┤
│ Status │ Name │ ID │ Size │
├───────────────┼──────────────────────────────────────────────────────┼──────────────────────────────┼───────────┤
│ Not Installed │ App Engine Go Extensions │ app-engine-go │ 4.7 MiB │
│ Not Installed │ Appctl │ appctl │ 21.0 MiB │
│ Not Installed │ Artifact Registry Go Module Package Helper │ package-go-module │ < 1 MiB │
│ Not Installed │ Cloud Bigtable Command Line Tool │ cbt │ 17.2 MiB │
│ Not Installed │ Cloud Bigtable Emulator │ bigtable │ 7.1 MiB │
│ Not Installed │ Cloud Datastore Emulator │ cloud-datastore-emulator │ 36.2 MiB │
│ Not Installed │ Cloud Firestore Emulator │ cloud-firestore-emulator │ 44.5 MiB │
│ Not Installed │ Cloud Pub/Sub Emulator │ pubsub-emulator │ 63.3 MiB │
│ Not Installed │ Cloud Run Proxy │ cloud-run-proxy │ 13.3 MiB │
│ Not Installed │ Cloud SQL Proxy │ cloud_sql_proxy │ 7.8 MiB │
│ Not Installed │ Cloud Spanner Emulator │ cloud-spanner-emulator │ 36.0 MiB │
│ Not Installed │ Cloud Spanner Migration Tool │ harbourbridge │ 20.9 MiB │
│ Not Installed │ Google Container Registry's Docker credential helper │ docker-credential-gcr │ 1.8 MiB │
│ Not Installed │ Kustomize │ kustomize │ 4.3 MiB │
│ Not Installed │ Log Streaming │ log-streaming │ 13.9 MiB │
│ Not Installed │ Minikube │ minikube │ 35.4 MiB │
│ Not Installed │ Nomos CLI │ nomos │ 28.7 MiB │
│ Not Installed │ On-Demand Scanning API extraction helper │ local-extract │ 14.4 MiB │
│ Not Installed │ Skaffold │ skaffold │ 23.4 MiB │
│ Not Installed │ Spanner migration tool │ spanner-migration-tool │ 23.5 MiB │
│ Not Installed │ Terraform Tools │ terraform-tools │ 66.1 MiB │
│ Not Installed │ anthos-auth │ anthos-auth │ 21.8 MiB │
│ Not Installed │ config-connector │ config-connector │ 56.7 MiB │
│ Not Installed │ enterprise-certificate-proxy │ enterprise-certificate-proxy │ 8.6 MiB │
│ Not Installed │ gcloud Alpha Commands │ alpha │ < 1 MiB │
│ Not Installed │ gcloud Beta Commands │ beta │ < 1 MiB │
│ Not Installed │ gcloud app Java Extensions │ app-engine-java │ 126.1 MiB │
│ Not Installed │ gcloud app Python Extensions │ app-engine-python │ 5.0 MiB │
│ Not Installed │ gcloud app Python Extensions (Extra Libraries) │ app-engine-python-extras │ < 1 MiB │
│ Not Installed │ gke-gcloud-auth-plugin │ gke-gcloud-auth-plugin │ 7.9 MiB │
│ Not Installed │ kpt │ kpt │ 14.4 MiB │
│ Not Installed │ kubectl │ kubectl │ < 1 MiB │
│ Not Installed │ kubectl-oidc │ kubectl-oidc │ 21.8 MiB │
│ Not Installed │ pkg │ pkg │ │
│ Installed │ BigQuery Command Line Tool │ bq │ 1.7 MiB │
│ Installed │ Bundled Python 3.11 │ bundled-python3-unix │ 74.9 MiB │
│ Installed │ Cloud Storage Command Line Tool │ gsutil │ 11.3 MiB │
│ Installed │ Google Cloud CLI Core Libraries │ core │ 23.2 MiB │
│ Installed │ Google Cloud CRC32C Hash Tool │ gcloud-crc32c │ 1.2 MiB │
└───────────────┴──────────────────────────────────────────────────────┴──────────────────────────────┴───────────┘
To install or remove components at your current SDK version [469.0.0], run:
$ gcloud components install COMPONENT_ID
$ gcloud components remove COMPONENT_ID
To update your SDK installation to the latest version [469.0.0], run:
$ gcloud components update
Modify profile to update your $PATH and enable shell command completion?
Do you want to continue (Y/n)? Y
The Google Cloud SDK installer will now prompt you to update an rc file to bring the Google Cloud CLIs into your
environment.
Enter a path to an rc file to update, or leave blank to use [/home/spool/.bashrc]:
Backing up [/home/spool/.bashrc] to [/home/spool/.bashrc.backup].
[/home/spool/.bashrc] has been updated.
==> Start a new shell for the changes to take effect.
For more information on how to get started, please visit:
https://cloud.google.com/sdk/docs/quickstarts
And in facts, this works correctly when I open a new tab for the cmd. I get to open the project I want to open:
spool@fedora:~$ ./google-cloud-sdk/bin/gcloud init
Welcome! This command will take you through the configuration of gcloud.
Your current configuration has been set to: [default]
....
You are logged in as: [[email protected]].
Pick cloud project to use:
[1] arctic-badge-394712
[2] axial-sight-417412
[3] bamboo-antler-417319
[4] coherent-surf-414408
[5] hip-flare-416814
[6] igneous-axiom-326411
[7] ml-deployment-417517
[8] model-block-401119
[9] trim-habitat-408709
[10] trim-heaven-408709
[11] virtual-plexus-417319
[12] Enter a project ID
[13] Create a new project
Please enter numeric choice or text value (must exactly match list item): 7
Your current project has been set to: [ml-deployment-417517].
Not setting default zone/region (this feature makes it easier to use
[gcloud compute] by setting an appropriate default value for the
--zone and --region flag).
See https://cloud.google.com/compute/docs/gcloud-compute section on how to set
default compute region and zone manually. If you would like [gcloud init] to be
able to do this for you the next time you run it, make sure the
Compute Engine API is enabled for your project on the
https://console.developers.google.com/apis page.
Created a default .boto configuration file at [/home/spool/.boto]. See this file and
[https://cloud.google.com/storage/docs/gsutil/commands/config] for more
information about configuring Google Cloud Storage.
Your Google Cloud SDK is configured and ready to use!
* Commands that require authentication will use [email protected] by default
* Commands will reference project `ml-deployment-417517` by default
Run `gcloud help config` to learn how to change individual settings
This gcloud configuration is called [default]. You can create additional configurations if you work with multiple accounts and/or projects.
Run `gcloud topic configurations` to learn more.
Some things to try next:
* Run `gcloud --help` to see the Cloud Platform services you can interact with. And run `gcloud help COMMAND` to get help on any gcloud command.
* Run `gcloud topic --help` to learn about advanced features of the SDK like arg files and output formatting
* Run `gcloud cheat-sheet` to see a roster of go-to `gcloud` commands.
spool@fedora:~$ gcloud auth configure-docker europe-west2-docker.pkg.dev
WARNING: `docker` not in system PATH.
`docker` and `docker-credential-gcloud` need to be in the same PATH in order to work correctly together.
gcloud's Docker credential helper can be configured but it will not work until this is corrected.
Adding credentials for: europe-west2-docker.pkg.dev
After update, the following will be written to your Docker config file located at
[/home/spool/.docker/config.json]:
{
"credHelpers": {
"europe-west2-docker.pkg.dev": "gcloud"
}
}
Do you want to continue (Y/n)?
But the issue is right at the bottom there, when I use gcloud auth configure-docker europe-west2-docker.pkg.dev. This gives me that warning, and I am not sure I am doing this right because I use podman and not docker. Any suggestions how I can fix this up? I am looking at this article by the way.
This is confusing and there are several solutions.
The reason that it's quirky is that Google (as with all other registry providers) uses Docker's Registry API for both Artifact Registry (and the deprecated Container Registry). This is how Docker and Podman can interact consistently with any registry (DockerHub, Quay, Artifact Registry etc.).
Even though
gcloudprovides a CLI for most of Google Cloud Platform services, to interact with the registry, functionality is outsourced to your tool of choice.Configure authentication to Artifact Registry for Docker
(Note: It says "Docker" but you can use "Podman" interchangeably; I use Podman too).
I use the Access Token method:
The first command get an access token for your user (
[email protected]) account.The second command pipes the token (more secure) into
podman login. The--username=oauth2accesstokenis constant and--password-stdingets your piped token.Once you're logged in to a specific
{REGION}, you should be able to: