0

I am trying to setup a google cloud shell environment for my google cloud project that uses Cloud ML.

I am following the instructions on their setup page itself:

Getting Setup | Google Cloud Machine Learning

I executed this command in my cloud shell:

curl https://raw.githubusercontent.com/GoogleCloudPlatform/cloudml-samples/master/tools/setup_cloud_shell.sh | bash

The last part of ouput trace for this was :

  • echo 'Success! Your environment has the required tools and dependencies.' Success! Your environment has the required tools and dependencies.

This command:

export PATH=${HOME}/.local/bin:${PATH}

Produces no ouput.

And finally the command to check the environment:

curl https://raw.githubusercontent.com/GoogleCloudPlatform/cloudml-samples/master/tools/check_environment.py | python

Produces this output:

vineetkaushik053@cloudshell:~$ curl https://raw.githubusercontent.com/GoogleCloudPlatform/cloudml-samples/master/tools/check_environment.py | python
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3814  100  3814    0     0  17274      0 --:--:-- --:--:-- --:--:-- 17257
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Your active configuration is: [cloudshell-11180]
ERROR: Unable to list Cloud ML models: {
  "error": {
    "code": 400,
    "message": "Field: parent Error: Name should be in the form of 'projects/your-project-id'",
    "status": "INVALID_ARGUMENT",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.BadRequest",
        "fieldViolations": [
          {
            "field": "parent",
            "description": "Name should be in the form of 'projects/your-project-id'"
          }
        ]
      }
    ]
  }
}

When it should be producing:

"Success! Your environment is configured correctly." when the script finishes successfully.

Please tell me how to resolve this so that I may move to the next part of the setup.

Flame of udun
  • 2,136
  • 7
  • 35
  • 79

1 Answers1

3

Resolved this.

Need to set the project for the environment. You can use this command:

gcloud config set project your-project-ID

Flame of udun
  • 2,136
  • 7
  • 35
  • 79
  • Yes, from "@cloudshell" string in your original output it looks like you started Cloud Shell without having a current project in Cloud Console. Typically the current project is set up in the shell automatically to match the current Cloud Console project. – Alexey Alexandrov Nov 30 '16 at 02:38