-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
59 lines (46 loc) · 1.41 KB
/
Makefile
File metadata and controls
59 lines (46 loc) · 1.41 KB
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
SHELL = /bin/bash
HOST ?= $(shell hostname -I | awk '{print $$1}')
PORT ?= 8080
TEST_NP ?= 4
WORKERS ?= 32
MAX_MEM ?= unlimited
run:
uvicorn sandbox.server.server:app --reload --host $(HOST) --port $(PORT)
run-online:
echo "SAVE_BAD_CASES: $${SAVE_BAD_CASES}"
ulimit -Sv $(MAX_MEM) && \
ulimit -a && \
uvicorn sandbox.server.server:app --host $(HOST) --port $(PORT) --workers $(WORKERS) --loop asyncio
run-distributed:
echo "SAVE_BAD_CASES: $${SAVE_BAD_CASES}"
bash deploy/write_address.sh $(HOST) $(PORT) &
ulimit -Sv $(MAX_MEM) && \
ulimit -a && \
uvicorn sandbox.server.server:app --host $(HOST) --port $(PORT) --workers $(WORKERS) --loop asyncio
build-server-image:
docker build . -f scripts/Dockerfile.server -t sandbox:server
test:
pytest -m "not cuda and not datalake and not dp_eval and not lean" -n $(TEST_NP)
test-cuda:
pytest -m cuda
test-minor:
pytest -m minor
test-verilog:
pytest -m verilog
test-verilog-pdb:
pytest -m verilog --pdb --capture=no
test-online:
ONLINE_TEST=1 pytest
test-case:
pytest -s -vv -k $(CASE)
format:
pycln --config pyproject.toml
isort sandbox/*
yapf -ir sandbox/*
format-client:
mv scripts/client/pyproject.toml scripts/faas/pyproject.toml && yapf -ir scripts/client/* && mv scripts/faas/pyproject.toml scripts/client/pyproject.toml
# mypy --explicit-package-bases sandbox
check:
pycln --config pyproject.toml --check
yapf --diff --recursive sandbox/*
make test