enhance: [skip 2e2]add the option of host network mode into builder_gpu.sh file (#30573)

Signed-off-by: Sammy Huang <sammy.huang@zilliz.com>
This commit is contained in:
sammy.huang 2024-02-19 14:14:55 +08:00 committed by GitHub
parent 99297ab81b
commit cbfe344ecf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View File

@ -5,6 +5,10 @@ set -euo pipefail
# Absolute path to the toplevel milvus directory.
toplevel=$(dirname "$(cd "$(dirname "${0}")"; pwd)")
if [[ "$IS_NETWORK_MODE_HOST" == "true" ]]; then
sed -i '/gpubuilder:/,/^\s*$/s/image: \${IMAGE_REPO}\/milvus-env:gpu-\${OS_NAME}-\${GPU_DATE_VERSION}/&\n network_mode: "host"/' $toplevel/docker-compose.yml
fi
export OS_NAME="${OS_NAME:-ubuntu20.04}"
pushd "${toplevel}"

View File

@ -34,7 +34,10 @@ pipeline {
container('main') {
script {
sh './build/set_docker_mirror.sh'
sh "./build/builder_gpu.sh /bin/bash -c \"make gpu-install\""
sh """
export IS_NETWORK_MODE_HOST="true"
./build/builder_gpu.sh /bin/bash -c \"make gpu-install\"
"""
def date = sh(returnStdout: true, script: 'date +%Y%m%d').trim()
def gitShortCommit = sh(returnStdout: true, script: 'git rev-parse --short HEAD').trim()