• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2rm -rf ./*.log
3CURDIR=$(pwd)
4
5HOST_IP_STR=$(ifconfig -a | grep inet | grep -v 127.0.0.1 | grep -v inet6 | awk '{print $2}' | tr -d "addr:")
6HOST_IPS=("$HOST_IP_STR")
7HOST_IP=${HOST_IPS[-1]}
8
9DEVICE_IP=$(cat /etc/hccn.conf | grep -E 'address_0')
10DEVICE_IP=${DEVICE_IP#*=}
11
12RANK_TABLE_FILE=${CURDIR}/rank_table_file.json
13ESCLUSTER_CONFIG_PATH=${CURDIR}/escluster_config.json
14echo $RANK_TABLE_FILE
15echo $ESCLUSTER_CONFIG_PATH
16
17sed -i "s/10.155.170.21/${HOST_IP}/g" ${RANK_TABLE_FILE} ${ESCLUSTER_CONFIG_PATH}
18sed -i "s/192.168.100.101/${DEVICE_IP}/g" ${RANK_TABLE_FILE} ${ESCLUSTER_CONFIG_PATH}
19
20export RANK_TABLE_FILE
21export ESCLUSTER_CONFIG_PATH
22export MS_DISABLE_REF_MODE=1
23export JOB_ID=10087
24
25msrun --worker_num=1 --rank_table_file=$RANK_TABLE_FILE --local_worker_num=1 python ${CURDIR}/test_es_external_api.py > es.log 2>&1 &
26
27status=$(echo $?)
28if [ "${status}" != "0" ]; then
29    exit 1
30fi
31exit 0