forked from augml/ollama-ui
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
30 lines (25 loc) · 936 Bytes
/
Makefile
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
.PHONY: default download_resources web_server ollama_server
# Default task that downloads the assets and starts the ollama and web server
default: download_resources
@$(MAKE) -j 2 web_server ollama_server
# Web Server
web_server:
python3 -m http.server --bind 127.0.0.1
# Web Server
ollama_server:
ollama serve
# Task to download resources
download_resources:
# Check if resources directory exists, if not create it
@if [ ! -d "resources" ]; then \
mkdir -p ./resources/ && \
cd ./resources/ && \
curl -O https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css && \
curl -O https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/js/bootstrap.bundle.min.js && \
curl -O https://cdn.jsdelivr.net/npm/marked@6.0.0/marked.min.js && \
curl -O https://cdn.jsdelivr.net/npm/dompurify@3.0.5/dist/purify.min.js; \
fi
# Check SHA-256 hash
@shasum -a 256 -c resources.hash || exit 1
clean:
@rm -rf ./resources