-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
73 lines (52 loc) · 1.61 KB
/
Copy pathjustfile
File metadata and controls
73 lines (52 loc) · 1.61 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
73
# https://just.systems/man/en/
# REQUIRES
gcloud := require("gcloud")
uv := require("uv")
# SETTINGS
set dotenv-load := true
set dotenv-path := "agent/.env"
# ENVIRONS
export UV_ENV_FILE := "agent/.env"
# VARIABLES
AGENT := "agent"
# DEFAULTS
# display help information
default:
@just --list
# RECIPIES
# clean files
clean:
rm -rf {{AGENT}}/.adk
find . -type f -name '*.py[co]' -delete
find . -type d -name __pycache__ -exec rm -r {} \+
# setup cloud
cloud: services settings
# deploy the agent
deploy log_level="info" service_name=AGENT: clean export
uv run adk deploy cloud_run --project=$GOOGLE_CLOUD_PROJECT --region=$GOOGLE_CLOUD_LOCATION \
--service_name="{{service_name}}" --log_level="{{log_level}}" --trace_to_cloud --with_ui \
--a2a {{AGENT}} -- --memory=1Gi --min-instances=0 --max-instances=1 --session-affinity
# make requirements
export:
uv export --no-dev --format=requirements-txt > {{AGENT}}/requirements.txt
# install git hooks
hooks:
uv run pre-commit install --hook-type=pre-push
uv run pre-commit install --hook-type=commit-msg
# install everything
install: hooks 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}}"