forked from KenyonY/openai-forward
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (37 loc) · 959 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
.PHONY: start build push run down test twine log pull
image := "beidongjiedeguang/openai-forward:latest"
container := "openai-forward-container"
compose_path := "docker-compose.yaml"
start:
docker run -d \
--name $(container) \
--env-file .env \
-p 27001:8000 \
-v $(shell pwd)/Log:/home/openai-forward/Log \
-v $(shell pwd)/openai_forward:/home/openai-forward/openai_forward \
$(image)
exec:
docker exec -it $(container) bash
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