-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathrun.sh
53 lines (43 loc) · 1.25 KB
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
#####################################
## File name : run.sh
## Create date : 2018-11-26 11:19
## Modified date : 2019-11-17 23:40
## Author : DARREN
## Describe : not set
## Email : [email protected]
####################################
realpath=$(readlink -f "$0")
basedir=$(dirname "$realpath")
export basedir=$basedir/cmd_sh/
export filename=$(basename "$realpath")
export PATH=$PATH:$basedir
export PATH=$PATH:$basedir/dlbase
export PATH=$PATH:$basedir/dlproc
#base sh file
. dlbase.sh
#function sh file
. etc.sh
kill -9 `ps -ef|grep main.py|grep -v grep|awk '{print $2}'`
kill -9 `ps -ef|grep defunct|grep -v grep|awk '{print$3}'`
function create_vir_env(){
dlfile_check_is_have_dir $env_path
if [[ $? -eq 0 ]]; then
bash ./cmd_sh/create_env.sh
else
$DLLOG_INFO "$1 virtual env had been created"
fi
}
create_vir_env
#bash ./cmd_sh/check_code.sh
# source $env_path/py2env/bin/activate
# deactivate
source $env_path/py3env/bin/activate
#jupyter notebook
#python ./tank_learn/main.py
#pip install torch-1.3.1-cp35-cp35m-manylinux1_x86_64.whl
python main.py
#pip install -i https://pypi.tuna.tsinghua.edu.cn/simple gym
#python ./antisubmarine_learn/pic.py
#python ./antisubmarine_learn/main_PPO_continuous_gym.py
deactivate