-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
78 lines (58 loc) · 2.04 KB
/
Copy pathMakefile
File metadata and controls
78 lines (58 loc) · 2.04 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
# Makefile for Ollama & OpenWebUI Management Scripts
# Color Definitions
C_BOLD := \033[1m
C_ULINE := \033[4m
C_MAGENTA := \033[35m
C_CYAN := \033[36m
C_RESET := \033[0m
# Use bash for all shell commands
SHELL := /bin/bash
# Define script directories
SRC_DIR := ./src
WEBUI_DIR := ./openwebui
# Set the default goal to 'help' so that running 'make' by itself shows the help menu
.DEFAULT_GOAL := help
# Phony targets are not real files
.PHONY: help install config status models run diagnose test restart stop logs webui-start webui-stop webui-update manager
help: ##@ ✨ Show this help message
@printf "\n$(C_BOLD)Ollama & OpenWebUI Management Scripts$(C_RESET)\n\n"
@printf "$(C_BOLD)%-15s %s$(C_RESET)\n" "Target" "Description"; \
awk 'BEGIN {FS = ":.*?##@ "} \
/^##@ - / { \
print ""; \
printf "$(C_BOLD)$(C_MAGENTA)%s$(C_RESET)\n", substr($$0, 7); \
next \
} \
/^[a-zA-Z0-9_-]+:.*?##@/ { printf "$(C_CYAN)%-15s$(C_RESET) %s\n", $$1, $$2 }' \
$(MAKEFILE_LIST)
##@ - Ollama 🤖 Management
manager: ##@ Ollama Manager 🚀
@$(SRC_DIR)/ollama-manager.sh
install: ##@ Install 📦 or update Ollama
@$(SRC_DIR)/install-ollama.sh
config: ##@ Configure ⚙️ Ollama settings
@$(SRC_DIR)/config-ollama.sh
status: ##@ Check service status
@$(SRC_DIR)/check-status.sh
models: ##@ Manage local models
@$(SRC_DIR)/manage-models.sh
run: ##@ Run a local model
@$(SRC_DIR)/run-model.sh
diagnose: ##@ Generate a diagnostic report 🩺
@$(SRC_DIR)/diagnose.sh
test: ##@ Run all script self-tests
@$(SRC_DIR)/test-all.sh
##@ - Ollama Service Management
restart: ##@ Restart the Ollama service
@$(SRC_DIR)/restart-ollama.sh
stop: ##@ Stop 🛑 the Ollama service
@$(SRC_DIR)/stop-ollama.sh
logs: ##@ View Ollama service logs 📜
@$(SRC_DIR)/logs-ollama.sh -f
##@ - OpenWebUI 🌐 Service Management
webui-start: ##@ Start the OpenWebUI service
@$(WEBUI_DIR)/start-openwebui.sh
webui-stop: ##@ Stop the OpenWebUI service
@$(WEBUI_DIR)/stop-openwebui.sh
webui-update: ##@ Update the OpenWebUI service
@$(WEBUI_DIR)/update-openwebui.sh