-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathmakefile
More file actions
105 lines (76 loc) · 2.39 KB
/
makefile
File metadata and controls
105 lines (76 loc) · 2.39 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
# 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)
# ==============================================================================
# Mongo support
#
# db.book.find({id: 300})
# ==============================================================================
# Examples
example1:
go run cmd/examples/example1/main.go
example2:
go run cmd/examples/example2/main.go
example3:
go run -exec "env DYLD_LIBRARY_PATH=$$GOPATH/src/github.com/ardanlabs/ai-training/foundation/word2vec/libw2v/lib" cmd/examples/example3/main.go
example4:
go run cmd/examples/example4/main.go
example5:
go run cmd/examples/example5/main.go
example6:
go run cmd/examples/example6/main.go
example7:
go run cmd/examples/example7/main.go
example8:
go run cmd/examples/example8/main.go
# ==============================================================================
# Install dependencies
install:
brew install mongosh
brew install ollama
brew install mplayer
brew install pgcli
docker:
docker pull mongodb/mongodb-atlas-local
docker pull dyrnq/open-webui:main
docker pull postgres:16.4
ollama-pull:
ollama pull mxbai-embed-large
ollama pull llama3.2
ollama pull gemma2:27b
# ==============================================================================
# Manage project
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
ollama-up:
export OLLAMA_MODELS="zarf/docker/ollama/models" && \
ollama serve
ollama-logs:
tail -f -n 100 ~/.ollama/logs/server.log
# ==============================================================================
# Run Tooling
download-data:
curl -o zarf/data/example3.gz -X GET http://snap.stanford.edu/data/amazon/productGraph/categoryFiles/reviews_Cell_Phones_and_Accessories_5.json.gz \
&& gunzip -k -d zarf/data/example3.gz \
&& mv zarf/data/example3 zarf/data/example3.json
clean-data:
go run cmd/cleaner/main.go
mongo:
mongosh -u ardan -p ardan mongodb://localhost:27017
pgcli:
pgcli postgresql://postgres:postgres@localhost
openwebui:
open -a "Google Chrome" http://localhost:3000/
# ==============================================================================
# Modules support
tidy:
go mod tidy
go mod vendor
deps-upgrade:
go get -u -v ./...
go mod tidy
go mod vendor