Skip to content

Commit

Permalink
fix translation gaudi env (#653)
Browse files Browse the repository at this point in the history
Signed-off-by: chensuyue <suyue.chen@intel.com>
  • Loading branch information
chensuyue authored Aug 22, 2024
1 parent 9657f7b commit 4f3be23
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 12 deletions.
5 changes: 3 additions & 2 deletions DocSum/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

FROM langchain/langchain:latest
FROM python:3.11-slim

RUN apt-get update -y && apt-get install -y --no-install-recommends --fix-missing \
libgl1-mesa-glx \
libjemalloc-dev \
vim
vim \
git

RUN useradd -m -s /bin/bash user && \
mkdir -p /home/user && \
Expand Down
5 changes: 3 additions & 2 deletions FaqGen/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

FROM langchain/langchain:latest
FROM python:3.11-slim


RUN apt-get update -y && apt-get install -y --no-install-recommends --fix-missing \
libgl1-mesa-glx \
libjemalloc-dev \
vim
vim \
git

RUN useradd -m -s /bin/bash user && \
mkdir -p /home/user && \
Expand Down
2 changes: 1 addition & 1 deletion Translation/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.


FROM langchain/langchain:latest
FROM python:3.11-slim

RUN apt-get update -y && apt-get install -y --no-install-recommends --fix-missing \
libgl1-mesa-glx \
Expand Down
10 changes: 9 additions & 1 deletion Translation/docker/gaudi/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,15 @@ services:
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
TGI_LLM_ENDPOINT: ${TGI_LLM_ENDPOINT}
HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
HF_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
HF_HUB_DISABLE_PROGRESS_BARS: 1
HF_HUB_ENABLE_HF_TRANSFER: 0
HABANA_VISIBLE_DEVICES: all
OMPI_MCA_btl_vader_single_copy_mechanism: none
runtime: habana
cap_add:
- SYS_NICE
ipc: host
volumes:
- "./data:/data"
command: --model-id ${LLM_MODEL_ID} --max-input-length 1024 --max-total-tokens 2048
Expand Down
5 changes: 2 additions & 3 deletions Translation/tests/test_translation_on_gaudi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function start_services() {
if grep -q Connected ${LOG_PATH}/tgi_service_start.log; then
break
fi
sleep 5s
sleep 10s
n=$((n+1))
done
}
Expand Down Expand Up @@ -84,8 +84,7 @@ function validate_services() {

function validate_microservices() {
# Check if the microservices are running correctly.
# TODO: Any results check required??
sleep 3m

# tgi gaudi service
validate_services \
"${ip_address}:8008/generate" \
Expand Down
5 changes: 2 additions & 3 deletions Translation/tests/test_translation_on_xeon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function start_services() {
if grep -q Connected ${LOG_PATH}/tgi_service_start.log; then
break
fi
sleep 5s
sleep 10s
n=$((n+1))
done
}
Expand Down Expand Up @@ -82,8 +82,7 @@ function validate_services() {

function validate_microservices() {
# Check if the microservices are running correctly.
# TODO: Any results check required??
sleep 3m

# tgi for llm service
validate_services \
"${ip_address}:8008/generate" \
Expand Down

0 comments on commit 4f3be23

Please sign in to comment.