diff --git a/script/install_megawise.sh b/script/install_megawise.sh index b31cb0b..57f8563 100755 --- a/script/install_megawise.sh +++ b/script/install_megawise.sh @@ -2,7 +2,7 @@ if [ $# -eq 1 ];then dir_location=$1 - megawise_tag=0.4.0 + megawise_tag=0.5.0 elif [ $# -eq 2 ];then dir_location=$1 megawise_tag=$2 @@ -42,12 +42,14 @@ if [ $MEGAWISE_CNT -ne 0 ];then fi mkdir ${dir_location}/conf -wget -P ${dir_location}/conf https://raw.githubusercontent.com/Infini-Analytics/infini/master/config/db/chewie_main.yaml +wget -P ${dir_location}/conf https://raw.githubusercontent.com/Infini-Analytics/infini/master/config/db/user_config.yaml wget -P ${dir_location}/conf https://raw.githubusercontent.com/Infini-Analytics/infini/master/config/db/etcd.yaml -wget -P ${dir_location}/conf https://raw.githubusercontent.com/Infini-Analytics/infini/master/config/db/megawise_config.yaml wget -P ${dir_location}/conf https://raw.githubusercontent.com/Infini-Analytics/infini/master/config/db/megawise_config_template.yaml -wget -P ${dir_location}/conf https://raw.githubusercontent.com/Infini-Analytics/infini/master/config/db/render_engine.yaml -wget -P ${dir_location}/conf https://raw.githubusercontent.com/Infini-Analytics/infini/master/config/db/scheduler_config_template.yaml +wget -P ${dir_location}/conf https://raw.githubusercontent.com/Infini-Analytics/infini/master/config/db/etcd_config_template.yaml +wget -P ${dir_location}/conf https://raw.githubusercontent.com/Infini-Analytics/infini/master/config/db/etcd_config.yaml +wget -P ${dir_location}/conf https://raw.githubusercontent.com/Infini-Analytics/infini/master/config/db/megawise_config.yaml + + if [ -f "/tmp/nyc_taxi_data.csv" ];then echo "Warning: /tmp/nyc_taxi_data.csv already exists, you can delete it." else @@ -61,14 +63,17 @@ echo " 4.megawise port MEGAWISE_PORT=5433" mkdir ${dir_location}/data mkdir ${dir_location}/server_data +mkdir ${dir_location}/logs docker run --gpus all --shm-size 4294967296 \ + -e USER=`id -u` -e GROUP=`id -g` \ -v ${dir_location}/conf:/megawise/conf \ -v ${dir_location}/data:/megawise/data \ + -v ${dir_location}/logs:/megawise/logs \ -v ${dir_location}/server_data:/megawise/server_data \ - -v $HOME/.nv:/home/megawise/.nv \ + -v /home/$USER/.nv:/home/megawise/.nv \ -v /tmp:/tmp \ + -d \ -p 5433:5432 \ - -d \ ${megawise_image_id} IS_RUN=$(docker ps | grep ${megawise_image_id} | wc -l) @@ -88,7 +93,7 @@ echo "State: start megawise in docker successfully!" container_id=$(docker ps |grep ${megawise_image_id} |awk '{printf "%s\n",$1}') echo "State: copying example data into meagwise.......please wait....." -docker exec -u megawise -it ${container_id} /tmp/data_import.sh +docker exec -u `id -u` -it ${container_id} /tmp/data_import.sh if [ $? -ne 0 ]; then echo "Error: import test data failed, you do it by hand using data_import.sh!" exit 0