All participants will be provided with Google Cloud (GCP) accounts to develop and run CHIA loops.
To get started, download and run this setup script. It accepts the terms, enables the APIs, and starts a machine in GCP that you can use for developing during the tutorial.
In the commands below, replace <email> and <project-name> with the GCP
account and project we gave you.
Linux, macOS
curl -L -O "https://raw.githubusercontent.com/ucb-bar/chia-tutorial/refs/heads/main/setup_gcp.sh"
chmod +x setup_gcp.sh./setup_gcp.sh --account <email> --project <project-name>Windows (PowerShell)
curl.exe -L -O "https://raw.githubusercontent.com/ucb-bar/chia-tutorial/refs/heads/main/setup_gcp.ps1"powershell -ExecutionPolicy Bypass -File .\setup_gcp.ps1 -Account <email> -Project <project-name>When you run the setup script:
- A Google sign-in opens in your browser: log in with the GCP credentials we gave you.
- Open and accept the GCP terms of service (make sure you're logged into the correct account).
- Antigravity login:
- Choose "Use a Google Cloud project" -> "Continue with Google Cloud", then log in in the browser.
- Type in your project name, choose
globalfor the location, and choose Agent Platform. - Go through the prompts, then exit by pressing
CTRL+Dtwice.
Rerun the setup script with the purge option (--purge on Linux/macOS,
-Purge on Windows). It deletes the VM and offers to remove the rest. Replace
<email> and <project-name> as above.
Linux, macOS
./setup_gcp.sh --account <email> --project <project-name> --purgeWindows (PowerShell)
powershell -ExecutionPolicy Bypass -File .\setup_gcp.ps1 -Account <email> -Project <project-name> -PurgeFeel free to use any remote development environment you like.
The setup script finishes by printing ways to SSH in from a terminal, e.g.:
gcloud compute ssh chia-dev --zone us-west4-cor ssh chia-dev.us-west4-c.<project-name> (the setup script added this
host to your ~/.ssh/config).
You can also use VS Code with the Remote - SSH extension. With the extension installed:
- Press
CTRL+SHIFT+P. - Search for
Remote-SSH: Connect to Host. - Select
chia-dev.us-west4-c.<project-name>in the dropdown (the setup script added it to your~/.ssh/config). - Step through the prompts (the OS is Linux; choose Yes / Accept).
Edit your ~/.bashrc file
nano ~/.bashrcComment out the following lines:
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esacAnd add the following lines to the bottom
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
if [ ! -S "$SSH_AUTH_SOCK" ]; then
eval "$(ssh-agent -a "$SSH_AUTH_SOCK")" > /dev/null
fiClone the GitHub repo for the tutorial:
cd ~
git clone https://github.com/ucb-bar/chia-tutorial
cd chia-tutorial
git submodule update --initCreate a conda environment and install CHIA:
conda env create -f environment.yml
conda activate chia_envCreate an SSH key, add it to the ssh-agent, and authorize it on this machine:
ssh-keygen -t ed25519 -f ~/.ssh/chia-key
ssh-add ~/.ssh/chia-key
cat ~/.ssh/chia-key.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys