-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMakefile
73 lines (57 loc) · 2.38 KB
/
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
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
# Declare all phony targets (targets that don't represent files)
.PHONY: setup-gpu test-gpu docker-up-linux-gpu docker-up-mac-gpu docker-up-windows-gpu docker-up-cpu-only watch-gpu clean-up run-demo run-status-check clean-up-demo
# Install NVIDIA drivers and required GPU dependencies
setup-gpu:
@sudo ./scripts/setup-gpu.sh
# Test GPU availability and NVIDIA driver installation by running a test container
test-gpu:
@docker run --rm --gpus all nvidia/cuda:12.0.0-base-ubuntu22.04 nvidia-smi
run-status-check:
@sudo ./scripts/status-check.sh
# Install Docker and required dependencies
install-docker:
@sudo ./scripts/install-docker.sh
# Start Docker containers with GPU support on Linux
docker-up-linux-gpu:
@sudo docker compose -f docker-compose.yml -f docker-compose.gpu.yml up -d
# Start Docker containers with GPU support on macOS
docker-up-mac-gpu:
@sudo docker compose -f docker-compose.yml -f docker-compose.mac.yml up -d
# Start Docker containers with GPU support on Windows
docker-up-windows-gpu:
@sudo docker compose -f docker-compose.yml -f docker-compose.gpu.yml -f docker-compose.windows.yml up -d
# Start Docker containers without GPU support (CPU only)
docker-up-cpu-only:
@sudo docker compose up -d
# Monitor GPU usage and statistics in real-time (updates every 0.5 seconds)
watch-gpu:
@watch -n 0.5 nvidia-smi
# Setup the logging chain for TCP monitoring
setup-watch-tcp:
@sudo ./scripts/watch-tcp-setup.sh
# Watch TCP connections initiated by the containers, in real-time
watch-tcp-raw:
@echo "Watching TCP connections initiated by the containers..."
@sudo ./scripts/watch-tcp.sh
# Watch TCP connections in real-time with color-coded output
watch-tcp:
@echo "Watching TCP connections initiated by the containers..."
@sudo ./scripts/watch-tcp.sh | python3 ./scripts/log_parser.py
# Watch only the TCP connections to the outside world that are initiated by the containers
watch-tcp-external-only:
@echo "Watching TCP connections to the outside world initiated by the containers..."
@sudo ./scripts/watch-tcp.sh | python3 ./scripts/log_parser.py --external-only
# Stop and remove all running containers
clean-up:
@sudo docker compose down
# Clean up after running the demo
clean-up-demo:
@rm -rf ./demo-deploy
@docker stop deepseek-ollama
@docker rm deepseek-ollama
@docker stop deepseek-webui
@docker rm deepseek-webui
# Run the demo
run-demo:
@rm -rf ./demo-deploy
@./run-demo.sh