-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (40 loc) · 1.56 KB
/
Makefile
File metadata and controls
49 lines (40 loc) · 1.56 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
MODE ?= cpu
.PHONY: help build upgrade start stop agent logs clean
help:
@echo "🚀 Pi Coding Agent + Llama.cpp Environment"
@echo ""
@echo "Usage: make [target] [MODE=cpu|gpu]"
@echo "Default MODE is 'cpu'."
@echo ""
@echo "Available commands:"
@echo " make start - Start the LLM environment in the background"
@echo " make agent - Start and enter the interactive coding agent"
@echo " make stop - Stop the environment"
@echo " make logs - View logs for the running services"
@echo " make build - Build the Docker images"
@echo " make upgrade - Pull latest base images and rebuild without cache"
@echo " make clean - Stop all and remove containers/networks/volumes"
@echo ""
@echo "Examples:"
@echo " make start (Starts in CPU mode)"
@echo " make start MODE=gpu (Starts in GPU mode)"
@echo " make agent (Enters agent using CPU mode config)"
@echo " make agent MODE=gpu (Enters agent using GPU mode config)"
@echo ""
build:
docker compose -f docker-compose.$(MODE).yml build
upgrade:
docker compose -f docker-compose.$(MODE).yml build --pull --no-cache
start:
mkdir -p workspace models agent_data
chmod 777 models agent_data
docker compose -f docker-compose.$(MODE).yml up --build -d
stop:
docker compose -f docker-compose.$(MODE).yml down
agent:
docker compose -f docker-compose.$(MODE).yml run --rm agent
logs:
docker compose -f docker-compose.$(MODE).yml logs -f
clean:
docker compose -f docker-compose.cpu.yml down -v
docker compose -f docker-compose.gpu.yml down -v