From 1494bc647002d2443477e783246e1dac8bc2f925 Mon Sep 17 00:00:00 2001 From: zhangyale <1194926515@qq.com> Date: Thu, 20 Feb 2025 01:26:33 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9install=5Feulercopilot.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangyale <1194926515@qq.com> --- .../install_eulercopilot.sh | 44 +++++++++---------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/deploy/scripts/8-install-EulerCopilot/install_eulercopilot.sh b/deploy/scripts/8-install-EulerCopilot/install_eulercopilot.sh index 3cb5f6ede..c65fc3882 100644 --- a/deploy/scripts/8-install-EulerCopilot/install_eulercopilot.sh +++ b/deploy/scripts/8-install-EulerCopilot/install_eulercopilot.sh @@ -1,7 +1,5 @@ #!/bin/bash - - # 颜色定义 RED='\e[31m' GREEN='\e[32m' @@ -45,26 +43,26 @@ get_eth0_ip() { } -## 获取 eth0 IP 地址 -#get_eth0_ip() { -# echo -e "${BLUE}获取网络接口 IP 地址...${NC}" -# local timeout=20 -# local start_time=$(date +%s) -# -# while [ $(( $(date +%s) - start_time )) -lt $timeout ]; do -# interface=$(ip -o link show | awk '/state UP/ {print $2}' | cut -d':' -f1 | head -1) -# [[ -n "$interface" ]] && break || sleep 1 -# done -# -# if [[ -z "$interface" ]]; then -# echo -e "${RED}错误:未找到可用网络接口${NC}" -# exit 1 -# fi -# -# host=$(ip addr show $interface | grep -w inet | awk '{print $2}' | cut -d'/' -f1) -# -# echo -e "${GREEN}使用网络接口:${interface},IP 地址:${host}${NC}" -#} +# 获取 eth0 IP 地址 +get_eth0_ip() { + echo -e "${BLUE}获取网络接口 IP 地址...${NC}" + local timeout=20 + local start_time=$(date +%s) + + while [ $(( $(date +%s) - start_time )) -lt $timeout ]; do + interface=$(ip -o link show | awk '/state UP/ {print $2}' | cut -d':' -f1 | head -1) + [[ -n "$interface" ]] && break || sleep 1 + done + + if [[ -z "$interface" ]]; then + echo -e "${RED}错误:未找到可用网络接口${NC}" + exit 1 + fi + + host=$(ip addr show $interface | grep -w inet | awk '{print $2}' | cut -d'/' -f1) + + echo -e "${GREEN}使用网络接口:${interface},IP 地址:${host}${NC}" +} # 获取用户输入参数 get_user_input() { @@ -131,7 +129,7 @@ modify_yaml() { --set "models.answer.name=deepseek-llm-7b-chat" \ --set "models.answer.ctx_length=8192" \ --set "models.answer.max_tokens=2048" \ - --set "models.embedding.url=http://$host:11434/embeddings" \ + --set "models.embedding.url=http://$host:11434/v1/embeddings" \ --set "models.embedding.key=sk-123456" \ --set "models.embedding.name=bge-m3" \ --set "login.type=authhub" \ -- Gitee