Skip to content

Commit 61c6278

Browse files
xiguiwChingis Yundunov
authored and
Chingis Yundunov
committed
HUGGINGFACEHUB_API_TOKEN environment is change to HF_TOKEN (opea-project#1503)
Signed-off-by: Wang, Xigui <xigui.wang@intel.com> Signed-off-by: Chingis Yundunov <YundunovCN@sibedge.com>
1 parent 24b3737 commit 61c6278

File tree

69 files changed

+263
-113
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+263
-113
lines changed

AudioQnA/docker_compose/intel/cpu/xeon/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Before starting the services with `docker compose`, you have to recheck the foll
4949

5050
```bash
5151
export host_ip=<your External Public IP> # export host_ip=$(hostname -I | awk '{print $1}')
52-
export HUGGINGFACEHUB_API_TOKEN=<your HF token>
52+
export HF_TOKEN=<your HF token>
5353

5454
export LLM_MODEL_ID=Intel/neural-chat-7b-v3-3
5555

AudioQnA/docker_compose/intel/cpu/xeon/set_env.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55

66
# export host_ip=<your External Public IP>
77
export host_ip=$(hostname -I | awk '{print $1}')
8-
export HUGGINGFACEHUB_API_TOKEN=${HUGGINGFACEHUB_API_TOKEN}
8+
9+
if [ -z "$HF_TOKEN" ]; then
10+
echo "Error: The HF_TOKEN environment variable is **NOT** set. Please set it"
11+
return -1
12+
fi
913
# <token>
1014

1115
export LLM_MODEL_ID=Intel/neural-chat-7b-v3-3

AudioQnA/docker_compose/intel/hpu/gaudi/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Before starting the services with `docker compose`, you have to recheck the foll
4949

5050
```bash
5151
export host_ip=<your External Public IP> # export host_ip=$(hostname -I | awk '{print $1}')
52-
export HUGGINGFACEHUB_API_TOKEN=<your HF token>
52+
export HF_TOKEN=<your HF token>
5353

5454
export LLM_MODEL_ID=Intel/neural-chat-7b-v3-3
5555

AudioQnA/docker_compose/intel/hpu/gaudi/compose.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ services:
4545
no_proxy: ${no_proxy}
4646
http_proxy: ${http_proxy}
4747
https_proxy: ${https_proxy}
48-
HUGGING_FACE_HUB_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
48+
HUGGING_FACE_HUB_TOKEN: ${HF_TOKEN}
49+
HF_TOKEN: ${HF_TOKEN}
4950
HF_HUB_DISABLE_PROGRESS_BARS: 1
5051
HF_HUB_ENABLE_HF_TRANSFER: 0
5152
HABANA_VISIBLE_DEVICES: all

AudioQnA/docker_compose/intel/hpu/gaudi/set_env.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@
55

66
# export host_ip=<your External Public IP>
77
export host_ip=$(hostname -I | awk '{print $1}')
8-
export HUGGINGFACEHUB_API_TOKEN=${HUGGINGFACEHUB_API_TOKEN}
8+
9+
if [ -z "$HF_TOKEN" ]; then
10+
echo "Error: The HF_TOKEN environment variable is **NOT** set. Please set it"
11+
return -1
12+
fi
13+
14+
export HF_TOKEN=${HF_TOKEN}
915
# <token>
1016

1117
export LLM_MODEL_ID=Intel/neural-chat-7b-v3-3

AvatarChatbot/docker_compose/intel/cpu/xeon/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Then run the command `docker images`, you will have following images ready:
5858
Before starting the services with `docker compose`, you have to recheck the following environment variables.
5959

6060
```bash
61-
export HUGGINGFACEHUB_API_TOKEN=<your_hf_token>
61+
export HF_TOKEN=<your_hf_token>
6262
export host_ip=$(hostname -I | awk '{print $1}')
6363

6464
export LLM_MODEL_ID=Intel/neural-chat-7b-v3-3
@@ -173,7 +173,7 @@ In the current version v1.0, you need to set the avatar figure image/video and t
173173
cd GenAIExamples/AvatarChatbot/tests
174174
export IMAGE_REPO="opea"
175175
export IMAGE_TAG="latest"
176-
export HUGGINGFACEHUB_API_TOKEN=<your_hf_token>
176+
export HF_TOKEN=<your_hf_token>
177177

178178
test_avatarchatbot_on_xeon.sh
179179
```

AvatarChatbot/docker_compose/intel/cpu/xeon/compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ services:
3737
no_proxy: ${no_proxy}
3838
http_proxy: ${http_proxy}
3939
https_proxy: ${https_proxy}
40-
HF_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
40+
HF_TOKEN: ${HF_TOKEN}
4141
healthcheck:
4242
test: ["CMD-SHELL", "curl -f http://${host_ip}:3006/health || exit 1"]
4343
interval: 10s

AvatarChatbot/docker_compose/intel/hpu/gaudi/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Then run the command `docker images`, you will have following images ready:
5858
Before starting the services with `docker compose`, you have to recheck the following environment variables.
5959

6060
```bash
61-
export HUGGINGFACEHUB_API_TOKEN=<your_hf_token>
61+
export HF_TOKEN=<your_hf_token>
6262
export host_ip=$(hostname -I | awk '{print $1}')
6363

6464
export LLM_MODEL_ID=Intel/neural-chat-7b-v3-3
@@ -183,7 +183,7 @@ In the current version v1.0, you need to set the avatar figure image/video and t
183183
cd GenAIExamples/AvatarChatbot/tests
184184
export IMAGE_REPO="opea"
185185
export IMAGE_TAG="latest"
186-
export HUGGINGFACEHUB_API_TOKEN=<your_hf_token>
186+
export HF_TOKEN=<your_hf_token>
187187

188188
test_avatarchatbot_on_gaudi.sh
189189
```

AvatarChatbot/docker_compose/intel/hpu/gaudi/compose.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ services:
3838
- SYS_NICE
3939
restart: unless-stopped
4040
tgi-service:
41-
image: ghcr.io/huggingface/tgi-gaudi:2.0.6
41+
image: ghcr.io/huggingface/tgi-gaudi:2.3.1
4242
container_name: tgi-gaudi-server
4343
ports:
4444
- "3006:80"
@@ -48,7 +48,8 @@ services:
4848
no_proxy: ${no_proxy}
4949
http_proxy: ${http_proxy}
5050
https_proxy: ${https_proxy}
51-
HUGGING_FACE_HUB_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
51+
HUGGING_FACE_HUB_TOKEN: ${HF_TOKEN}
52+
HF_TOKEN: ${HF_TOKEN}
5253
HF_HUB_DISABLE_PROGRESS_BARS: 1
5354
HF_HUB_ENABLE_HF_TRANSFER: 0
5455
HABANA_VISIBLE_DEVICES: all

ChatQnA/docker_compose/intel/cpu/aipc/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export https_proxy=${your_http_proxy}
105105
export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5"
106106
export RERANK_MODEL_ID="BAAI/bge-reranker-base"
107107
export INDEX_NAME="rag-redis"
108-
export HUGGINGFACEHUB_API_TOKEN=${your_hf_api_token}
108+
export HF_TOKEN=${your_hf_api_token}
109109
export OLLAMA_HOST=${host_ip}
110110
export OLLAMA_MODEL="llama3.2"
111111
```
@@ -116,7 +116,7 @@ export OLLAMA_MODEL="llama3.2"
116116
set EMBEDDING_MODEL_ID=BAAI/bge-base-en-v1.5
117117
set RERANK_MODEL_ID=BAAI/bge-reranker-base
118118
set INDEX_NAME=rag-redis
119-
set HUGGINGFACEHUB_API_TOKEN=%your_hf_api_token%
119+
set HF_TOKEN=%your_hf_api_token%
120120
set OLLAMA_HOST=host.docker.internal
121121
set OLLAMA_MODEL="llama3.2"
122122
```

ChatQnA/docker_compose/intel/cpu/aipc/compose.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ services:
2424
REDIS_HOST: redis-vector-db
2525
INDEX_NAME: ${INDEX_NAME}
2626
TEI_ENDPOINT: http://tei-embedding-service:80
27-
HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
27+
HUGGINGFACEHUB_API_TOKEN: ${HF_TOKEN}
28+
HF_TOKEN: ${HF_TOKEN}
2829
tei-embedding-service:
2930
image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.5
3031
container_name: tei-embedding-server
@@ -54,7 +55,8 @@ services:
5455
REDIS_HOST: redis-vector-db
5556
INDEX_NAME: ${INDEX_NAME}
5657
TEI_EMBEDDING_ENDPOINT: http://tei-embedding-service:80
57-
HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
58+
HUGGINGFACEHUB_API_TOKEN: ${HF_TOKEN}
59+
HF_TOKEN: ${HF_TOKEN}
5860
LOGFLAG: ${LOGFLAG}
5961
RETRIEVER_COMPONENT_NAME: "OPEA_RETRIEVER_REDIS"
6062
restart: unless-stopped
@@ -70,7 +72,8 @@ services:
7072
no_proxy: ${no_proxy}
7173
http_proxy: ${http_proxy}
7274
https_proxy: ${https_proxy}
73-
HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
75+
HUGGINGFACEHUB_API_TOKEN: ${HF_TOKEN}
76+
HF_TOKEN: ${HF_TOKEN}
7477
HF_HUB_DISABLE_PROGRESS_BARS: 1
7578
HF_HUB_ENABLE_HF_TRANSFER: 0
7679
command: --model-id ${RERANK_MODEL_ID} --auto-truncate

ChatQnA/docker_compose/intel/cpu/aipc/set_env.sh

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,11 @@ pushd "../../../../../" > /dev/null
77
source .set_env.sh
88
popd > /dev/null
99

10-
if [ -z "${your_hf_api_token}" ]; then
11-
echo "Error: HUGGINGFACEHUB_API_TOKEN is not set. Please set your_hf_api_token."
10+
if [ -z "${HF_TOKEN}" ]; then
11+
echo "Error: HF_TOKEN is not set. Please set HF_TOKEN."
1212
fi
1313

14-
if [ -z "${host_ip}" ]; then
15-
echo "Error: host_ip is not set. Please set host_ip first."
16-
fi
17-
18-
export HUGGINGFACEHUB_API_TOKEN=${your_hf_api_token}
14+
export host_ip=$(hostname -I | awk '{print $1}')
1915
export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5"
2016
export RERANK_MODEL_ID="BAAI/bge-reranker-base"
2117
export INDEX_NAME="rag-redis"

ChatQnA/docker_compose/intel/cpu/xeon/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ To set up environment variables for deploying ChatQnA services, follow these ste
2121
```bash
2222
# Example: host_ip="192.168.1.1"
2323
export host_ip="External_Public_IP"
24-
export HUGGINGFACEHUB_API_TOKEN="Your_Huggingface_API_Token"
24+
export HF_TOKEN="Your_Huggingface_API_Token"
2525
```
2626

2727
2. If you are in a proxy environment, also set the proxy-related environment variables:
@@ -228,7 +228,7 @@ For users in China who are unable to download models directly from Huggingface,
228228
```bash
229229
# Example: host_ip="192.168.1.1"
230230
export host_ip="External_Public_IP"
231-
export HUGGINGFACEHUB_API_TOKEN="Your_Huggingface_API_Token"
231+
export HF_TOKEN="Your_Huggingface_API_Token"
232232
# Example: NGINX_PORT=80
233233
export NGINX_PORT=${your_nginx_port}
234234
```

ChatQnA/docker_compose/intel/cpu/xeon/compose.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ services:
2424
REDIS_HOST: redis-vector-db
2525
INDEX_NAME: ${INDEX_NAME}
2626
TEI_ENDPOINT: http://tei-embedding-service:80
27-
HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
27+
HUGGINGFACEHUB_API_TOKEN: ${HF_TOKEN}
28+
HF_TOKEN: ${HF_TOKEN}
2829
tei-embedding-service:
2930
image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.5
3031
container_name: tei-embedding-server
@@ -54,7 +55,8 @@ services:
5455
REDIS_HOST: redis-vector-db
5556
INDEX_NAME: ${INDEX_NAME}
5657
TEI_EMBEDDING_ENDPOINT: http://tei-embedding-service:80
57-
HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
58+
HUGGINGFACEHUB_API_TOKEN: ${HF_TOKEN}
59+
HF_TOKEN: ${HF_TOKEN}
5860
LOGFLAG: ${LOGFLAG}
5961
RETRIEVER_COMPONENT_NAME: "OPEA_RETRIEVER_REDIS"
6062
restart: unless-stopped
@@ -70,7 +72,8 @@ services:
7072
no_proxy: ${no_proxy}
7173
http_proxy: ${http_proxy}
7274
https_proxy: ${https_proxy}
73-
HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
75+
HUGGINGFACEHUB_API_TOKEN: ${HF_TOKEN}
76+
HF_TOKEN: ${HF_TOKEN}
7477
HF_HUB_DISABLE_PROGRESS_BARS: 1
7578
HF_HUB_ENABLE_HF_TRANSFER: 0
7679
command: --model-id ${RERANK_MODEL_ID} --auto-truncate

ChatQnA/docker_compose/intel/cpu/xeon/set_env.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ pushd "../../../../../" > /dev/null
77
source .set_env.sh
88
popd > /dev/null
99

10+
if [ -z "$HF_TOKEN" ]; then
11+
echo "Error: The HF_TOKEN environment variable is **NOT** set. Please set it"
12+
return -1
13+
fi
14+
1015
export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5"
1116
export RERANK_MODEL_ID="BAAI/bge-reranker-base"
1217
export LLM_MODEL_ID="meta-llama/Meta-Llama-3-8B-Instruct"

ChatQnA/docker_compose/intel/hpu/gaudi/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ To set up environment variables for deploying ChatQnA services, follow these ste
2121
```bash
2222
# Example: host_ip="192.168.1.1"
2323
export host_ip="External_Public_IP"
24-
export HUGGINGFACEHUB_API_TOKEN="Your_Huggingface_API_Token"
24+
export HF_TOKEN="Your_Huggingface_API_Token"
2525
```
2626

2727
2. If you are in a proxy environment, also set the proxy-related environment variables:
@@ -197,9 +197,9 @@ For users in China who are unable to download models directly from Huggingface,
197197
export HF_ENDPOINT="https://hf-mirror.com"
198198
model_name="meta-llama/Meta-Llama-3-8B-Instruct"
199199
# Start vLLM LLM Service
200-
docker run -p 8007:80 -v ./data:/data --name vllm-gaudi-server -e HF_ENDPOINT=$HF_ENDPOINT -e http_proxy=$http_proxy -e https_proxy=$https_proxy --runtime=habana -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none -e HUGGING_FACE_HUB_TOKEN=$HF_TOKEN -e VLLM_TORCH_PROFILER_DIR="/mnt" --cap-add=sys_nice --ipc=host opea/vllm-gaudi:latest --model $model_name --tensor-parallel-size 1 --host 0.0.0.0 --port 80 --block-size 128 --max-num-seqs 256 --max-seq_len-to-capture 2048
200+
docker run -p 8007:80 -v ./data:/data --name vllm-gaudi-server -e HF_ENDPOINT=$HF_ENDPOINT -e http_proxy=$http_proxy -e https_proxy=$https_proxy --runtime=habana -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none -e HUGGING_FACE_HUB_TOKEN=$HF_TOKEN -e HF_TOKEN=$HF_TOKEN -e VLLM_TORCH_PROFILER_DIR="/mnt" --cap-add=sys_nice --ipc=host opea/vllm-gaudi:latest --model $model_name --tensor-parallel-size 1 --host 0.0.0.0 --port 80 --block-size 128 --max-num-seqs 256 --max-seq_len-to-capture 2048
201201
# Start TGI LLM Service
202-
docker run -p 8005:80 -v ./data:/data --name tgi-gaudi-server -e HF_ENDPOINT=$HF_ENDPOINT -e http_proxy=$http_proxy -e https_proxy=$https_proxy --runtime=habana -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none -e HUGGING_FACE_HUB_TOKEN=$HF_TOKEN -e ENABLE_HPU_GRAPH=true -e LIMIT_HPU_GRAPH=true -e USE_FLASH_ATTENTION=true -e FLASH_ATTENTION_RECOMPUTE=true --cap-add=sys_nice --ipc=host ghcr.io/huggingface/tgi-gaudi:2.0.6 --model-id $model_name --max-input-tokens 1024 --max-total-tokens 2048
202+
docker run -p 8005:80 -v ./data:/data --name tgi-gaudi-server -e HF_ENDPOINT=$HF_ENDPOINT -e http_proxy=$http_proxy -e https_proxy=$https_proxy --runtime=habana -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none -e HUGGING_FACE_HUB_TOKEN=$HF_TOKEN -e HF_TOKEN=$HF_TOKEN -e ENABLE_HPU_GRAPH=true -e LIMIT_HPU_GRAPH=true -e USE_FLASH_ATTENTION=true -e FLASH_ATTENTION_RECOMPUTE=true --cap-add=sys_nice --ipc=host ghcr.io/huggingface/tgi-gaudi:2.0.6 --model-id $model_name --max-input-tokens 1024 --max-total-tokens 2048
203203
```
204204

205205
2. Offline
@@ -214,9 +214,9 @@ For users in China who are unable to download models directly from Huggingface,
214214
export HF_TOKEN=${your_hf_token}
215215
export model_path="/path/to/model"
216216
# Start vLLM LLM Service
217-
docker run -p 8007:80 -v $model_path:/data --name vllm-gaudi-server --runtime=habana -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none -e HUGGING_FACE_HUB_TOKEN=$HF_TOKEN -e VLLM_TORCH_PROFILER_DIR="/mnt" --cap-add=sys_nice --ipc=host opea/vllm-gaudi:latest --model /data --tensor-parallel-size 1 --host 0.0.0.0 --port 80 --block-size 128 --max-num-seqs 256 --max-seq_len-to-capture 2048
217+
docker run -p 8007:80 -v $model_path:/data --name vllm-gaudi-server --runtime=habana -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none -e HUGGING_FACE_HUB_TOKEN=$HF_TOKEN -e HF_TOKEN=$HF_TOKEN -e VLLM_TORCH_PROFILER_DIR="/mnt" --cap-add=sys_nice --ipc=host opea/vllm-gaudi:latest --model /data --tensor-parallel-size 1 --host 0.0.0.0 --port 80 --block-size 128 --max-num-seqs 256 --max-seq_len-to-capture 2048
218218
# Start TGI LLM Service
219-
docker run -p 8005:80 -v $model_path:/data --name tgi-gaudi-server --runtime=habana -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none -e HUGGING_FACE_HUB_TOKEN=$HF_TOKEN -e ENABLE_HPU_GRAPH=true -e LIMIT_HPU_GRAPH=true -e USE_FLASH_ATTENTION=true -e FLASH_ATTENTION_RECOMPUTE=true --cap-add=sys_nice --ipc=host ghcr.io/huggingface/tgi-gaudi:2.0.6 --model-id /data --max-input-tokens 1024 --max-total-tokens 2048
219+
docker run -p 8005:80 -v $model_path:/data --name tgi-gaudi-server --runtime=habana -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none -e HUGGING_FACE_HUB_TOKEN=$HF_TOKEN -e HF_TOKEN=$HF_TOKEN -e ENABLE_HPU_GRAPH=true -e LIMIT_HPU_GRAPH=true -e USE_FLASH_ATTENTION=true -e FLASH_ATTENTION_RECOMPUTE=true --cap-add=sys_nice --ipc=host ghcr.io/huggingface/tgi-gaudi:2.0.6 --model-id /data --max-input-tokens 1024 --max-total-tokens 2048
220220
```
221221

222222
### Setup Environment Variables
@@ -226,7 +226,7 @@ For users in China who are unable to download models directly from Huggingface,
226226
```bash
227227
# Example: host_ip="192.168.1.1"
228228
export host_ip="External_Public_IP"
229-
export HUGGINGFACEHUB_API_TOKEN="Your_Huggingface_API_Token"
229+
export HF_TOKEN="Your_Huggingface_API_Token"
230230
# Example: NGINX_PORT=80
231231
export NGINX_PORT=${your_nginx_port}
232232
```

ChatQnA/docker_compose/intel/hpu/gaudi/compose.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ services:
2424
REDIS_HOST: redis-vector-db
2525
INDEX_NAME: ${INDEX_NAME}
2626
TEI_ENDPOINT: http://tei-embedding-service:80
27-
HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
27+
HUGGINGFACEHUB_API_TOKEN: ${HF_TOKEN}
28+
HF_TOKEN: ${HF_TOKEN}
2829
tei-embedding-service:
2930
image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.5
3031
container_name: tei-embedding-gaudi-server
@@ -54,7 +55,8 @@ services:
5455
REDIS_HOST: redis-vector-db
5556
INDEX_NAME: ${INDEX_NAME}
5657
TEI_EMBEDDING_ENDPOINT: http://tei-embedding-service:80
57-
HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
58+
HUGGINGFACEHUB_API_TOKEN: ${HF_TOKEN}
59+
HF_TOKEN: ${HF_TOKEN}
5860
restart: unless-stopped
5961
tei-reranking-service:
6062
image: ghcr.io/huggingface/tei-gaudi:1.5.0
@@ -88,7 +90,7 @@ services:
8890
no_proxy: ${no_proxy}
8991
http_proxy: ${http_proxy}
9092
https_proxy: ${https_proxy}
91-
HF_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
93+
HF_TOKEN: ${HF_TOKEN}
9294
HABANA_VISIBLE_DEVICES: all
9395
OMPI_MCA_btl_vader_single_copy_mechanism: none
9496
LLM_MODEL_ID: ${LLM_MODEL_ID}

ChatQnA/docker_compose/intel/hpu/gaudi/set_env.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ pushd "../../../../../" > /dev/null
66
source .set_env.sh
77
popd > /dev/null
88

9+
if [ -z "$HF_TOKEN" ]; then
10+
echo "Error: The HF_TOKEN environment variable is **NOT** set. Please set it"
11+
return -1
12+
fi
913

1014
export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5"
1115
export RERANK_MODEL_ID="BAAI/bge-reranker-base"

CodeGen/docker_compose/intel/cpu/xeon/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export http_proxy=${your_http_proxy}
101101
export https_proxy=${your_http_proxy}
102102
export LLM_MODEL_ID="Qwen/Qwen2.5-Coder-7B-Instruct"
103103
export TGI_LLM_ENDPOINT="http://${host_ip}:8028"
104-
export HUGGINGFACEHUB_API_TOKEN=${your_hf_api_token}
104+
export HF_TOKEN=${your_hf_api_token}
105105
export MEGA_SERVICE_HOST_IP=${host_ip}
106106
export LLM_SERVICE_HOST_IP=${host_ip}
107107
export BACKEND_SERVICE_ENDPOINT="http://${host_ip}:7778/v1/codegen"

CodeGen/docker_compose/intel/cpu/xeon/compose.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ services:
1414
no_proxy: ${no_proxy}
1515
http_proxy: ${http_proxy}
1616
https_proxy: ${https_proxy}
17-
HF_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
17+
HF_TOKEN: ${HF_TOKEN}
1818
host_ip: ${host_ip}
1919
healthcheck:
2020
test: ["CMD-SHELL", "curl -f http://$host_ip:8028/health || exit 1"]
@@ -37,7 +37,8 @@ services:
3737
https_proxy: ${https_proxy}
3838
LLM_ENDPOINT: ${TGI_LLM_ENDPOINT}
3939
LLM_MODEL_ID: ${LLM_MODEL_ID}
40-
HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
40+
HUGGINGFACEHUB_API_TOKEN: ${HF_TOKEN}
41+
HF_TOKEN: ${HF_TOKEN}
4142
restart: unless-stopped
4243
codegen-xeon-backend-server:
4344
image: ${REGISTRY:-opea}/codegen:${TAG:-latest}

CodeGen/docker_compose/intel/hpu/gaudi/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export http_proxy=${your_http_proxy}
8787
export https_proxy=${your_http_proxy}
8888
export LLM_MODEL_ID="Qwen/Qwen2.5-Coder-7B-Instruct"
8989
export TGI_LLM_ENDPOINT="http://${host_ip}:8028"
90-
export HUGGINGFACEHUB_API_TOKEN=${your_hf_api_token}
90+
export HF_TOKEN=${your_hf_api_token}
9191
export MEGA_SERVICE_HOST_IP=${host_ip}
9292
export LLM_SERVICE_HOST_IP=${host_ip}
9393
export BACKEND_SERVICE_ENDPOINT="http://${host_ip}:7778/v1/codegen"

CodeGen/docker_compose/intel/hpu/gaudi/compose.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ services:
1515
https_proxy: ${https_proxy}
1616
HABANA_VISIBLE_DEVICES: all
1717
OMPI_MCA_btl_vader_single_copy_mechanism: none
18-
HUGGING_FACE_HUB_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
18+
HUGGING_FACE_HUB_TOKEN: ${HF_TOKEN}
19+
HF_TOKEN: ${HF_TOKEN}
1920
ENABLE_HPU_GRAPH: true
2021
LIMIT_HPU_GRAPH: true
2122
USE_FLASH_ATTENTION: true
@@ -45,7 +46,8 @@ services:
4546
https_proxy: ${https_proxy}
4647
LLM_ENDPOINT: ${TGI_LLM_ENDPOINT}
4748
LLM_MODEL_ID: ${LLM_MODEL_ID}
48-
HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
49+
HUGGINGFACEHUB_API_TOKEN: ${HF_TOKEN}
50+
HF_TOKEN: ${HF_TOKEN}
4951
restart: unless-stopped
5052
codegen-gaudi-backend-server:
5153
image: ${REGISTRY:-opea}/codegen:${TAG:-latest}

CodeGen/docker_compose/set_env.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ pushd "../../" > /dev/null
66
source .set_env.sh
77
popd > /dev/null
88

9+
if [ -z "$HF_TOKEN" ]; then
10+
echo "Error: The HF_TOKEN environment variable is **NOT** set. Please set it"
11+
return -1
12+
fi
913

14+
export host_ip=$(hostname -I | awk '{print $1}')
1015
export LLM_MODEL_ID="Qwen/Qwen2.5-Coder-7B-Instruct"
1116
export TGI_LLM_ENDPOINT="http://${host_ip}:8028"
1217
export MEGA_SERVICE_HOST_IP=${host_ip}

0 commit comments

Comments
 (0)