-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpath.sh
More file actions
executable file
·85 lines (65 loc) · 1.95 KB
/
path.sh
File metadata and controls
executable file
·85 lines (65 loc) · 1.95 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/bin/bash
export LANG=C
export EXPT="/eecs/research/asr/mingbin/ner-advance"
export LOCAL_SCRIPT=${EXPT}/scripts
##############
# CUDA-related
export CUDA_VISIBLE_DEVICES=${CUDA_VISIBLE_DEVICES:-""}
if [ `hostname` == "image" ] || [ `hostname` == "voice" ] || [ `hostname` == "audio" ]
then
export CUDA_HOME="/eecs/local/pkg/cuda-8.0.44"
else
export CUDA_HOME="/eecs/local/pkg/cuda"
fi
export PATH=${CUDA_HOME}/bin:${PATH}
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
# export LD_LIBRARY_PATH=/eecs/research/asr/Shared/cuDNN/lib64:${LD_LIBRARY_PATH}
#############
# GCC-related
export PATH=/eecs/research/asr/mingbin/gcc-4.9/bin:${PATH}
export LIBRARY_PATH=/eecs/research/asr/mingbin/gcc-4.9/lib64
export LD_LIBRARY_PATH=/eecs/research/asr/mingbin/gcc-4.9/lib64:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH=/eecs/research/asr/mingbin/mkl/mkl/lib/intel64:${LD_LIBRARY_PATH}
export OMP_NUM_THREADS=32
export MKL_NUM_THREADS=32
################
# PYTHON-related
source /eecs/research/asr/mingbin/python-workspace/hopeless/bin/activate
export PYTHONPATH=${EXPT}:${LOCAL_SCRIPT}
export NLTK_DATA=/eecs/research/asr/mingbin/nltk-data
###############
# debug-related
export KNRM="\x1B[0m"
export KRED="\x1B[31m"
export KGRN="\x1B[32m"
export KYEL="\x1B[33m"
export KBLU="\x1B[34m"
export KMAG="\x1B[35m"
export KCYN="\x1B[36m"
export KWHT="\x1B[37m"
function INFO() {
msg="$@"
printf "${KGRN}"
printf "`date +"%Y-%m-%d %H-%M-%S"` [INFO]: ${msg}\n"
printf "${KNRM}"
}
export -f INFO
function CRITICAL() {
msg="$@"
printf "${KRED}"
printf "`date +"%Y-%m-%d %H-%M-%S"` [CRITICAL]: ${msg}\n"
printf "${KNRM}"
}
export -f CRITICAL
function GivePerm {
dir=${1}
find ${dir} -perm 700 -exec chmod 755 '{}' \;
find ${dir} -perm 600 -exec chmod 644 '{}' \;
upper=$(cd ${dir}; pwd)
while [ ${upper} != '/' ]
do
chmod 755 ${upper} 2> /dev/null
upper=$(dirname ${upper})
done
}
export -f GivePerm