-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
72 lines (53 loc) · 1.69 KB
/
justfile
File metadata and controls
72 lines (53 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# https://just.systems/man/en/
# REQUIRES
gcloud := require("gcloud")
uv := require("uv")
# SETTINGS
set dotenv-load := true
# ENVIRONS
export UV_ENV_FILE := ".env"
# DEFAULTS
# display help information
default:
@just --list
# RECIPIES
# clean files
clean:
find . -type f -name '*.py[co]' -delete
find . -type d -name .adk -exec rm -r {} \+
find . -type d -name __pycache__ -exec rm -r {} \+
# setup cloud
cloud: services settings
# deploy the agent
deploy agent log_level="info": clean
uv export --no-dev --format=requirements-txt > {{agent}}/requirements.txt
gcloud run deploy {{agent}} --source ./{{agent}} \
--region=$GOOGLE_CLOUD_RUN_LOCATION --project=$GOOGLE_CLOUD_PROJECT \
--memory=1Gi --min-instances=0 --max-instances=1 \
--session-affinity --allow-unauthenticated
# deploy all agents
deploy-all:
@just deploy "ecommerce"
@just deploy "marketing"
@just deploy "da2a"
# ingest all datasets
ingest:
uv run scripts/ingest.py "datasets/Brazilian E-Commerce Public Dataset by Olist.zip" "ecommerce/database.sqlite"
uv run scripts/ingest.py "datasets/Marketing Funnel by Olist.zip" "marketing/database.sqlite"
# install everything
install: project
# install the project
project:
uv sync --all-groups
# enable cloud services
services:
gcloud services enable aiplatform.googleapis.com
gcloud services enable cloudbuild.googleapis.com
gcloud services enable run.googleapis.com
# configure cloud settings
settings:
gcloud config set core/project $GOOGLE_CLOUD_PROJECT
gcloud config list
# serve the agent web interface
web log_level="info":
uv run adk web --a2a --reload --reload_agents --log_level="{{log_level}}"