Skip to content

Commit

Permalink
Add note on how to switch GCP project (#1539)
Browse files Browse the repository at this point in the history
* doc

* clarify

* uppercase

* fix mnist example

* todo
  • Loading branch information
infwinston authored Dec 20, 2022
1 parent 95abfd0 commit ad37a47
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/source/getting-started/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ If running :code:`conda install -c conda-forge google-cloud-sdk` produces the er

Note: if you encounter *Authorization Error (Error 400: invalid_request)* with the url generated by :code:`gcloud auth login`, try installing the latest version of the `Google Cloud SDK <https://cloud.google.com/sdk/docs/install>`_ (e.g., with :code:`conda install -c conda-forge google-cloud-sdk`) on **your local machine** (which opened the browser) and rerun the command.

.. note::

If you are using multiple GCP projects, list all the configs by :code:`gcloud config configurations list` and activate one by :code:`gcloud config configurations activate <CONFIG_NAME>` (See `GCP docs <https://cloud.google.com/sdk/docs/configurations#activating_a_configuration>`_).

**Azure**

.. code-block:: console
Expand Down
1 change: 1 addition & 0 deletions docs/source/reference/tpu.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ Here is a complete task YAML that runs `MNIST training <https://cloud.google.com
pip install "jax[tpu]>=0.2.16" -f https://storage.googleapis.com/jax-releases/libtpu_releases.html
pip install --upgrade clu
pip install -e flax
pip install tensorflow tensorflow-datasets
fi
run: |
Expand Down
2 changes: 2 additions & 0 deletions sky/clouds/gcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
'~/.config/gcloud/'
'application_default_credentials.json')

# TODO(wei-lin): config_default may not be the config in use.
# See: https://github.com/skypilot-org/skypilot/pull/1539
GCP_CONFIG_PATH = '~/.config/gcloud/configurations/config_default'
# Do not place the backup under the gcloud config directory, as ray
# autoscaler can overwrite that directory on the remote nodes.
Expand Down

0 comments on commit ad37a47

Please sign in to comment.