File tree Expand file tree Collapse file tree
ChatQnA/serving/tgi_gaudi Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33git clone https://github.com/huggingface/tgi-gaudi.git
44cd ./tgi-gaudi/
5- docker build -t tgi_gaudi . --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy
5+ docker build -t ghcr.io/huggingface/tgi-gaudi:1.2.1 . --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy
Original file line number Diff line number Diff line change @@ -27,9 +27,9 @@ volume=$PWD/data
2727
2828# Build the Docker run command based on the number of cards
2929if [ " $num_cards " -eq 1 ]; then
30- docker_cmd=" docker run -p $port_number :80 -v $volume :/data --runtime=habana -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none --cap-add=sys_nice --ipc=host -e HTTPS_PROXY=$https_proxy -e HTTP_PROXY=$https_proxy ghcr.io/huggingface/tgi-gaudi --model-id $model_name "
30+ docker_cmd=" docker run -p $port_number :80 -v $volume :/data --runtime=habana -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none --cap-add=sys_nice --ipc=host -e HTTPS_PROXY=$https_proxy -e HTTP_PROXY=$https_proxy ghcr.io/huggingface/tgi-gaudi:1.2.1 --model-id $model_name "
3131else
32- docker_cmd=" docker run -p $port_number :80 -v $volume :/data --runtime=habana -e PT_HPU_ENABLE_LAZY_COLLECTIVES=true -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none --cap-add=sys_nice --ipc=host -e HTTPS_PROXY=$https_proxy -e HTTP_PROXY=$https_proxy ghcr.io/huggingface/tgi-gaudi --model-id $model_name --sharded true --num-shard $num_cards "
32+ docker_cmd=" docker run -p $port_number :80 -v $volume :/data --runtime=habana -e PT_HPU_ENABLE_LAZY_COLLECTIVES=true -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none --cap-add=sys_nice --ipc=host -e HTTPS_PROXY=$https_proxy -e HTTP_PROXY=$https_proxy ghcr.io/huggingface/tgi-gaudi:1.2.1 --model-id $model_name --sharded true --num-shard $num_cards "
3333fi
3434
3535# Execute the Docker run command
Original file line number Diff line number Diff line change @@ -4,9 +4,17 @@ Code generation is a noteworthy application of Large Language Model (LLM) techno
44# Environment Setup
55To use [ 🤗 text-generation-inference] ( https://github.com/huggingface/text-generation-inference ) on Intel Gaudi2, please follow these steps:
66
7- ## Build TGI Gaudi Docker Image
7+ ## Prepare Gaudi Image
8+ Getting started is straightforward with the official Docker container. Simply pull the image using:
9+
10+ ``` bash
11+ docker pull ghcr.io/huggingface/tgi-gaudi:1.2.1
12+ ```
13+
14+ Alternatively, you can build the Docker image yourself with:
15+
816``` bash
9- bash ./tgi_gaudi/build_docker.sh
17+ bash ./serving/ tgi_gaudi/build_docker.sh
1018```
1119
1220## Launch TGI Gaudi Service
Original file line number Diff line number Diff line change 1616
1717git clone https://github.com/huggingface/tgi-gaudi.git
1818cd ./tgi-gaudi/
19- docker build -t tgi_gaudi_codegen . --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy
19+ docker build -t ghcr.io/huggingface/tgi-gaudi:1.2.1 . --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy
Original file line number Diff line number Diff line change @@ -41,9 +41,9 @@ volume=$PWD/data
4141
4242# Build the Docker run command based on the number of cards
4343if [ " $num_cards " -eq 1 ]; then
44- docker_cmd=" docker run -p $port_number :80 -v $volume :/data --runtime=habana -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none --cap-add=sys_nice --ipc=host -e HTTPS_PROXY=$https_proxy -e HTTP_PROXY=$https_proxy tgi_gaudi_codegen --model-id $model_name "
44+ docker_cmd=" docker run -p $port_number :80 -v $volume :/data --runtime=habana -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none --cap-add=sys_nice --ipc=host -e HTTPS_PROXY=$https_proxy -e HTTP_PROXY=$https_proxy ghcr.io/huggingface/tgi-gaudi:1.2.1 --model-id $model_name "
4545else
46- docker_cmd=" docker run -p $port_number :80 -v $volume :/data --runtime=habana -e PT_HPU_ENABLE_LAZY_COLLECTIVES=true -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none --cap-add=sys_nice --ipc=host -e HTTPS_PROXY=$https_proxy -e HTTP_PROXY=$https_proxy tgi_gaudi_codegen --model-id $model_name --sharded true --num-shard $num_cards "
46+ docker_cmd=" docker run -p $port_number :80 -v $volume :/data --runtime=habana -e PT_HPU_ENABLE_LAZY_COLLECTIVES=true -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none --cap-add=sys_nice --ipc=host -e HTTPS_PROXY=$https_proxy -e HTTP_PROXY=$https_proxy ghcr.io/huggingface/tgi-gaudi:1.2.1 --model-id $model_name --sharded true --num-shard $num_cards "
4747fi
4848
4949# Execute the Docker run command
Original file line number Diff line number Diff line change 22
33git clone https://github.com/huggingface/tgi-gaudi.git
44cd ./tgi-gaudi/
5- docker build -t tgi_gaudi_doc_summary . --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy
5+ docker build -t ghcr.io/huggingface/tgi-gaudi:1.2.1 . --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy
Original file line number Diff line number Diff line change @@ -27,9 +27,9 @@ volume=$PWD/data
2727
2828# Build the Docker run command based on the number of cards
2929if [ " $num_cards " -eq 1 ]; then
30- docker_cmd=" docker run -p $port_number :80 -v $volume :/data --runtime=habana -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none --cap-add=sys_nice --ipc=host -e HTTPS_PROXY=$https_proxy -e HTTP_PROXY=$https_proxy tgi_gaudi_doc_summary --model-id $model_name "
30+ docker_cmd=" docker run -p $port_number :80 -v $volume :/data --runtime=habana -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none --cap-add=sys_nice --ipc=host -e HTTPS_PROXY=$https_proxy -e HTTP_PROXY=$https_proxy ghcr.io/huggingface/tgi-gaudi:1.2.1 --model-id $model_name "
3131else
32- docker_cmd=" docker run -p $port_number :80 -v $volume :/data --runtime=habana -e PT_HPU_ENABLE_LAZY_COLLECTIVES=true -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none --cap-add=sys_nice --ipc=host -e HTTPS_PROXY=$https_proxy -e HTTP_PROXY=$https_proxy tgi_gaudi_doc_summary --model-id $model_name --sharded true --num-shard $num_cards "
32+ docker_cmd=" docker run -p $port_number :80 -v $volume :/data --runtime=habana -e PT_HPU_ENABLE_LAZY_COLLECTIVES=true -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none --cap-add=sys_nice --ipc=host -e HTTPS_PROXY=$https_proxy -e HTTP_PROXY=$https_proxy ghcr.io/huggingface/tgi-gaudi:1.2.1 --model-id $model_name --sharded true --num-shard $num_cards "
3333fi
3434
3535# Execute the Docker run command
You can’t perform that action at this time.
0 commit comments