forked from KenyonY/openai-forward
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (46 loc) · 1.24 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
.PHONY: monitor start build push run down test twine log pull
image := "beidongjiedeguang/openai-forward:latest"
container := "openai-forward-container"
compose_path := "docker-compose.yaml"
monitor:
@./scripts/ai-forward-monitor.sh
#stop-monitor:
# @pkill -f ai-forward-monitor.sh
# @pkill aifd
start:
@docker run -d \
--restart=unless-stopped \
--name $(container) \
--env-file .env \
-p 8000:8000 \
-v $(shell pwd)/Log:/home/openai-forward/Log \
-v $(shell pwd)/CACHE_LMDB:/home/openai-forward/CACHE_LMDB \
-v $(shell pwd)/CACHE_LEVELDB:/home/openai-forward/CACHE_LEVELDB \
-v $(shell pwd)/openai_forward:/home/openai-forward/openai_forward \
$(image) --port=8000 --workers=2
@make log
exec:
docker exec -it $(container) sh
log:
docker logs -f $(container)
rm:
docker rm -f $(container)
up:
@docker-compose -f $(compose_path) up
down:
@docker-compose -f $(compose_path) down
run:
@docker-compose -f $(compose_path) run -it -p 8000:8000 openai_forward bash
test:
pytest -v tests
twine:
@twine upload dist/*
@rm -rf dist/*
build:
docker build --tag $(image) .
build-push:
docker buildx build --push --platform linux/arm64/v8,linux/amd64 --tag $(image) .
pull:
docker pull $(image)
deploy:
vercel --prod