diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0a85ab17..f5473d60 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -22,7 +22,7 @@ jobs: - name: Build website run: npm run build - name: Upload Build Artifact - uses: actions/upload-pages-artifact@v4 + uses: actions/upload-pages-artifact@v3 with: path: build @@ -39,4 +39,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v3 + uses: actions/deploy-pages@v4 diff --git a/docs/verifiable-ai-hackathon/0-onboarding-guide.mdx b/docs/hackathon/0-onboarding.mdx similarity index 65% rename from docs/verifiable-ai-hackathon/0-onboarding-guide.mdx rename to docs/hackathon/0-onboarding.mdx index 5ca7ed02..e35e9da5 100644 --- a/docs/verifiable-ai-hackathon/0-onboarding-guide.mdx +++ b/docs/hackathon/0-onboarding.mdx @@ -1,7 +1,7 @@ --- sidebar_position: 1 unlisted: true -slug: onboarding-guide +slug: onboarding title: Onboarding description: Step-by-step guide for setting up infrastructure, credentials, and cloud instances for the Verifiable AI Hackathon. keywords: [flare, ai, confidential-compute, hackathon, google-cloud, onboarding] @@ -20,13 +20,14 @@ import AddMetaData from "/static/img/verifiable-ai-hackathon/add-metadata.png"; # Onboarding -Welcome to the Verifiable AI Hackathon! This comprehensive guide will walk you through setting up your development environment, including Google Cloud infrastructure, API credentials, and Confidential Compute virtual machines. +Welcome to the **Verifiable AI Hackathon**! +This comprehensive guide will walk you through setting up your development environment, including Google Cloud infrastructure, API credentials, and Confidential Space virtual machines. ## Before You Begin - Plan for approximately 30-45 minutes to complete the entire setup - Keep track of your credentials in a secure location -- If you encounter any issues, reach out to the support team via the hackathon Discord channels +- If you encounter any issues, reach out to the Flare team on [Telegram](https://t.me/+StI5VEIvtIg2ODlh) ## Prerequisites @@ -34,18 +35,40 @@ Welcome to the Verifiable AI Hackathon! This comprehensive guide will walk you t - Use an existing Google account or create a new one - This account will be your primary access point for all hackathon resources -- Submit your Google account email during the registration process -- You'll receive access to the `google-hackathon-project` when approved, usually within a hour of submission +- Submit your Google account email during the hackathon registration process +- You'll receive access to the `google-hackathon-project` when approved ### Setting up Gemini API access -1. Log into your registered Google account -1. Visit the [Get a Gemini API key in Google AI Studio](https://aistudio.google.com/app/apikey) page +1. Log into your registered Google account after you receive the approval +1. Visit the [Get a Gemini API key](https://aistudio.google.com/app/apikey) page 1. Click on **Create API key** 1. Select `google-hackathon-project` from the dropdown 1. Click **Create API key in existing project** 1. Store your API key securely +:::tip[Adding Hackathon API keys to your environment] + +Add the following lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`): + +```bash +export GEMINI_API_KEY= +``` + +Apply the configuration: + +```bash +source ~/.bashrc # or source ~/.zshrc, you can also restart the shell +``` + +Verify: + +```bash +echo $GEMINI_API_KEY # Expected output: +``` + +::: + ## Setting up a VM ### Option A: Using gcloud CLI (Recommended) @@ -56,7 +79,7 @@ Follow these steps to set up a GCP instance using Confidential Space with Cloud 1. **Install the gcloud CLI** -- Follow the [gcloud CLI installation guide](https://cloud.google.com/sdk/docs/install) steps for your OS + Follow the [gcloud CLI installation guide](https://cloud.google.com/sdk/docs/install) steps for your OS 2. **Authenticate your CLI** @@ -68,7 +91,14 @@ Follow these steps to set up a GCP instance using Confidential Space with Cloud #### Create VM Instance -Use the following command template, replacing the placeholder variables (`<>`): +:::warning[Number of VM instances] + +Each hackathon team is limited to **one** continuously running VM. +You can briefly set up more than one instance for testing, but make sure you don't leave it running. + +::: + +Use the following command template, replacing the highlighted placeholder variables (`<>`): ```bash # highlight-next-line @@ -99,9 +129,9 @@ gcloud compute instances create \ **Required Variables:** -- ``: Your instance name (in the format `-`, e.g. `agent-gemini-team1`) -- ``: Image path (e.g., `ghcr.io/flare-foundation/flare-ai-core:main`) -- `` and ``: First environment variable name (e.g., GEMINI_API_KEY) and first environment variable value +- ``: Your instance name in the format `-`, e.g. `agent-gemini-team1` +- ``: Image path (e.g., `ghcr.io/flare-foundation/flare-ai-defai:main`) +- `` and ``: First environment variable name (e.g. `GEMINI_API_KEY`) and first environment variable value - Add additional comma separated environment variables as needed ### Option B: Using GCP Console @@ -111,7 +141,7 @@ Follow these steps to create your VM instance through the Google Cloud Console i 1. **Initial Setup** - Navigate to the [GCP Console](https://console.cloud.google.com/) - - Make sure _google-hackathon-project_ is selected + - Make sure **google-hackathon-project** is selected - Click **Compute Engine → VM instances → Create Instance**
@@ -125,7 +155,7 @@ Follow these steps to create your VM instance through the Google Cloud Console i 2. **Machine Configuration** - Name: `-` (e.g., `agent-gemini-team1`) - - Region: `us-west2` + - Region: `us-central1-c` - Machine Type: `n2d-standard-2`
@@ -184,12 +214,11 @@ Follow these steps to create your VM instance through the Google Cloud Console i - Click **Add Item** under Metadata - Add the following key-value pairs: - ```bash - tee-image-reference: - tee-container-log-redirect: cloud_logging - ``` - - - Additional API keys should be prefixed with `tee-env-`, e.g. the env variable `GEMINI_API_KEY` will become `tee-env-GEMINI_API_KEY` + | Key | Value | Notes | + | ---------------------------- | ------------------ | --------------------------------------------------- | + | `tee-image-reference` | `` | e.g. `ghcr.io/flare-foundation/flare-ai-defai:main` | + | `tee-container-log-redirect` | `true` | Sends VM logs to serial port and cloud logging | + | `tee-env-` | `` | e.g. `tee-env-GEMINI_API_KEY : MY_GEMINI_API_KEY` |
+## Track Templates + +You can use the following track templates to quickly get started building: + +| Track | Template Repository | +| ------------------ | ----------------------------------------------------------------------------------------- | +| Social AI Agents | [flare-foundation/flare-ai-social](https://github.com/flare-foundation/flare-ai-social) | +| RAG Knowledge | [flare-foundation/flare-ai-rag](https://github.com/flare-foundation/flare-ai-rag) | +| AI x DeFi (DeFAI) | [flare-foundation/flare-ai-defai](https://github.com/flare-foundation/flare-ai-defai) | +| Consensus Learning | [flare-research/flare-ai-consensus](https://github.com/flare-research/flare-ai-consensus) | + ## Troubleshooting +:::tip[Reach out for support] + +If you are unable to bugfix your issue, feel free to reach out to the Flare team on [Telegram](https://t.me/+StI5VEIvtIg2ODlh) for support. +When reaching out clearly mention the VM instance name. + +::: + - **VM Creation Fails** - Verify project permissions - Check quota limits diff --git a/sidebars.ts b/sidebars.ts index 49711a67..0a45d124 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -16,9 +16,11 @@ const sidebars: SidebarsConfig = { { type: "category", label: "Verifiable AI Hackathon", + link: { + type: "generated-index", + }, collapsed: true, - link: { type: "doc", id: "verifiable-ai-hackathon/onboarding-guide" }, - items: ["verifiable-ai-hackathon/onboarding-guide"], + items: [{ type: "autogenerated", dirName: "hackathon" }], }, { type: "category",