hf_text-generation-inference/server/Makefile

32 lines
1.1 KiB
Makefile
Raw Normal View History

2022-10-08 04:30:12 -06:00
gen-server:
mkdir bloom_inference/pb || true
python -m grpc_tools.protoc -I../proto --python_out=bloom_inference/pb --grpc_python_out=bloom_inference/pb ../proto/generate.proto
find bloom_inference/pb/ -type f -name "*.py" -print0 -exec sed -i -e 's/^\(import.*pb2\)/from . \1/g' {} \;
touch bloom_inference/pb/__init__.py
2022-10-18 07:19:03 -06:00
install-transformers:
# Install specific version of transformers
rm transformers || true
wget https://github.com/huggingface/transformers/archive/46d37bece7d3ffdef97b1ee4a3170c0a0627d921.zip
unzip 46d37bece7d3ffdef97b1ee4a3170c0a0627d921.zip
rm 46d37bece7d3ffdef97b1ee4a3170c0a0627d921.zip
mv transformers-46d37bece7d3ffdef97b1ee4a3170c0a0627d921 transformers
cd transformers && python setup.py install
2022-10-08 04:30:12 -06:00
2022-10-18 07:19:03 -06:00
install-torch:
# Install specific version of torch
pip install torch --extra-index-url https://download.pytorch.org/whl/cu116 --no-cache-dir
2022-10-08 04:30:12 -06:00
pip-install:
pip install grpcio-tools
make gen-server
2022-10-18 07:19:03 -06:00
make install-torch
make install-transformers
2022-10-08 04:30:12 -06:00
pip install .
install:
poetry install
2022-10-18 07:19:03 -06:00
make gen-server
make install-torch
make install-transformers