-
Notifications
You must be signed in to change notification settings - Fork 75
/
Makefile
62 lines (48 loc) · 1.19 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: start
start:
poetry run uvicorn app.main:app --port 9000 --workers 4
.PHONY: database
database:
poetry run python database.py
.PHONY: frontend
frontend:
cd frontend && git pull && npm install && npm run build
.PHONY: dev
dev:
RESTAI_DEV=true uvicorn app.main:app --reload --port 9000
.PHONY: install
install:
poetry install
make database
git clone https://github.com/apocas/restai-frontend frontend
make frontend
.PHONY: installgpu
installgpu:
poetry install --with gpu
.PHONY: installfix
installfix:
$(echo $(poetry env info -p)/bin/pip3 install flash-attn==2.6.3 --no-build-isolation)
.PHONY: docs
docs:
poetry run python3 docs.py
.PHONY: test
test:
pytest tests
.PHONY: code
code:
autopep8 --in-place app/*.py
.PHONY: clean
clean:
rm -rf frontend
.PHONY: dockershell
dockershell:
@docker run --rm -t -i -v $(shell pwd):/app restai bash
.PHONY: dockerbuild
dockerbuild:
@docker build -t restai .
.PHONY: dockernpminstall
dockernpminstall:
cd frontend && docker run --rm -t -i -v $(shell pwd):/app --workdir /app node:12.18.1 make frontend
.PHONY: dockernpmbuild
dockernpmbuild:
cd frontend && docker run --rm -t -i -v $(shell pwd):/app --workdir /app node:12.18.1 make npmbuild