Makefile 1.8 KB
Newer Older
Olivier Dehaene's avatar
v0.1.0  
Olivier Dehaene committed
1
install-server:
Nicolas Patry's avatar
Nicolas Patry committed
2
	cd server && make install
Olivier Dehaene's avatar
v0.1.0  
Olivier Dehaene committed
3

4
install-custom-kernels:
5
	if [ "$$BUILD_EXTENSIONS" = "True" ]; then cd server/custom_kernels && python setup.py install; else echo "Custom kernels are disabled, you need to set the BUILD_EXTENSIONS environment variable to 'True' in order to build them. (Please read the docs, kernels might not work on all hardware)"; fi
6

7
8
install-integration-tests:
	cd integration-tests && pip install -r requirements.txt
9
	cd clients/python && pip install .
10

Olivier Dehaene's avatar
v0.1.0  
Olivier Dehaene committed
11
12
13
14
15
16
install-router:
	cd router && cargo install --path .

install-launcher:
	cd launcher && cargo install --path .

17
18
19
install-benchmark:
	cd benchmark && cargo install --path .

20
install: install-server install-router install-launcher install-custom-kernels
Nicolas Patry's avatar
Nicolas Patry committed
21
22
23
24
25

server-dev:
	cd server && make run-dev

router-dev:
26
	cd router && cargo run -- --port 8080
Olivier Dehaene's avatar
v0.1.0  
Olivier Dehaene committed
27

28
rust-tests: install-router install-launcher
29
30
	cargo test

31
32
33
34
35
36
integration-tests: install-integration-tests
	pytest -s -vv -m "not private" integration-tests

update-integration-tests: install-integration-tests
	pytest -s -vv --snapshot-update integration-tests

37
python-server-tests:
38
	HF_HUB_ENABLE_HF_TRANSFER=1 pytest -s -vv -m "not private" server/tests
39
40
41
42
43

python-client-tests:
	pytest clients/python/tests

python-tests: python-server-tests python-client-tests
44

Olivier Dehaene's avatar
v0.1.0  
Olivier Dehaene committed
45
run-bloom-560m:
46
	text-generation-launcher --model-id bigscience/bloom-560m --num-shard 2 --port 8080
Olivier Dehaene's avatar
v0.1.0  
Olivier Dehaene committed
47

48
run-bloom-560m-quantize:
49
	text-generation-launcher --model-id bigscience/bloom-560m --num-shard 2 --quantize --port 8080
50
51

download-bloom:
OlivierDehaene's avatar
OlivierDehaene committed
52
	HF_HUB_ENABLE_HF_TRANSFER=1 text-generation-server download-weights bigscience/bloom
53

Olivier Dehaene's avatar
v0.1.0  
Olivier Dehaene committed
54
run-bloom:
55
	text-generation-launcher --model-id bigscience/bloom --num-shard 8 --port 8080
56
57

run-bloom-quantize:
58
	text-generation-launcher --model-id bigscience/bloom --num-shard 8 --quantize --port 8080
59
60
61

clean:
	rm -rf target aml