-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathmakefile
More file actions
113 lines (79 loc) · 2.27 KB
/
makefile
File metadata and controls
113 lines (79 loc) · 2.27 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# Check to see if we can use ash, in Alpine images, or default to BASH.
SHELL_PATH = /bin/ash
SHELL = $(if $(wildcard $(SHELL_PATH)),/bin/ash,/bin/bash)
# ==============================================================================
# Installation
install:
go install github.com/a-h/templ/cmd/templ@latest
brew install entr
brew install ollama
brew install tailscale
docker:
docker pull dyrnq/open-webui:main
# ==============================================================================
# Tailscale
tailscale-up:
tailscale serve --bg --tcp 4001 4000
tailscale-down:
tailscale serve --tcp 4001 off
# ==============================================================================
# Ollama
ollama-up:
export OLLAMA_MODELS="zarf/ollama/models" && \
export OLLAMA_DEBUG=1 && \
ollama serve
ollama-pull:
ollama pull llama3.2
ollama-logs:
tail -f -n 100 ~/.ollama/logs/server.log
# ==============================================================================
# OpenWebUI
compose-up:
docker compose -f zarf/docker/compose.yaml up
compose-down:
docker compose -f zarf/docker/compose.yaml down
compose-logs:
docker compose logs -n 100
openwebui:
open -a "Google Chrome" http://localhost:3000/
# ==============================================================================
# Chat
hack:
go run api/tooling/hack/main.go
run-cap:
go run api/services/cap/main.go | go run api/tooling/logfmt/main.go
run-tui:
go run api/clients/tui/main.go
run-tui-ai:
go run api/clients/tui/main.go --aimode=true
chat-test:
curl -i -X GET http://localhost:3000/test
chat-docker:
docker pull nats:2.10
chat-nats:
docker run -p 4222:4222 nats:2.10 -js
chat-nats-down:
docker stop nats:2.10
docker rm nats:2.10 -v
# ==============================================================================
# Modules support
tidy:
go mod tidy
go mod vendor
deps-upgrade:
go get -u -v ./...
go mod tidy
go mod vendor
# ==============================================================================
# Running tests within the local computer
test-r:
CGO_ENABLED=1 go test -race -count=1 ./...
test-only:
CGO_ENABLED=0 go test -count=1 ./...
lint:
CGO_ENABLED=0 go vet ./...
staticcheck -checks=all ./...
vuln-check:
govulncheck ./...
test: test-only lint vuln-check
test-race: test-r lint vuln-check