-
Notifications
You must be signed in to change notification settings - Fork 0
/
setenv_py3.sh
175 lines (134 loc) · 6.88 KB
/
setenv_py3.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
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
#!/bin/bash
# WE NEED TO SETUP ENV VARIABLES FOR ROOT, CUDA, OPENCV
alias python=python3
MACHINE=`uname --nodename`
if [ -z ${SINGULARITY_NAME} ]
then
echo "not inside singularity container"
else
echo "inside singularity container: ${SINGULARITY_CONTAINER}"
MACHINE=${SINGULARITY_NAME}
fi
if [ $MACHINE == "trex" ]
then
echo "SETUP TREX"
source /usr/local/root/6.16.00_py3/bin/thisroot.sh
export CUDA_HOME=/usr/local/cuda-10.0
[[ ":$LD_LIBRARY_PATH:" != *":${CUDA_HOME}/lib64:"* ]] && export LD_LIBRARY_PATH="${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}"
export OPENCV_INCDIR=/usr/local/opencv/opencv-3.4.6/include
export OPENCV_LIBDIR=/usr/local/opencv/opencv-3.4.6/lib
elif [ $MACHINE == "meitner" ]
then
echo "SETUP MEITNER"
source /usr/local/bin/thisroot.sh
export CUDA_HOME=/usr/local/cuda-10.0
[[ ":$LD_LIBRARY_PATH:" != *":${CUDA_HOME}/lib64:"* ]] && export LD_LIBRARY_PATH="${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}"
export OPENCV_INCDIR=/usr/include/opencv4
export OPENCV_LIBDIR=/usr/lib/x86_64-linux-gnu
elif [ $MACHINE == "goeppert" ]
then
echo "SETUP GOEPPERT"
source /usr/local/root/6.16.00_py3/bin/thisroot.sh
export CUDA_HOME=/usr/local/cuda/
[[ ":$LD_LIBRARY_PATH:" != *":${CUDA_HOME}/lib64:"* ]] && export LD_LIBRARY_PATH="${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}"
export OPENCV_INCDIR=/usr/local/include
export OPENCV_LIBDIR=/usr/local/lib
elif [ $MACHINE == "mayer" ]
then
echo "SETUP MAYER"
source /usr/local/root/6.16.00_python3/bin/thisroot.sh
export CUDA_HOME=/usr/local/cuda-10.0
[[ ":$LD_LIBRARY_PATH:" != *":${CUDA_HOME}/lib64:"* ]] && export LD_LIBRARY_PATH="${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}"
export OPENCV_INCDIR=/usr/local/include
export OPENCV_LIBDIR=/usr/local/lib
elif [ $MACHINE == "blade" ]
then
echo "SETUP TARITREE's RAZER BLADE"
source /home/twongjirad/software/root6/py3_build/bin/thisroot.sh
export CUDA_HOME=/usr/local/cuda
[[ ":$LD_LIBRARY_PATH:" != *":${CUDA_HOME}/lib64:"* ]] && export LD_LIBRARY_PATH="${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}"
export OPENCV_INCDIR=/usr/include
export OPENCV_LIBDIR=/usr/local/lib
elif [ $MACHINE == "pop-os" ]
then
echo "SETUP TARITREE's RAZER BLADE PRO"
#source /usr/local/root_6.32.02/bin/thisroot.sh # enums arent working in pyroot for this newer version which prefers to use c++17?
#source /usr/local/root/root-6.24.04/bin/thisroot.sh
source /usr/local/root_v6.28.12_py3.10/bin/thisroot.sh
export CUDA_HOME=/usr/lib/cuda/
[[ ":$LD_LIBRARY_PATH:" != *":${CUDA_HOME}/lib64:"* ]] && export LD_LIBRARY_PATH="${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}"
export OPENCV_INCDIR=/usr/include/opencv4
export OPENCV_LIBDIR=/usr/lib/x86_64-linux-gnu/
elif [ $MACHINE == "mmr-Alienware-x15-R1" ]
then
echo "SETUP MATT's ALIENWARE x15 R1"
source /home/matthew/software/root/install/bin/thisroot.sh
export CUDA_HOME=/usr/local/cuda-11.3/
[[ ":$LD_LIBRARY_PATH:" != *":${CUDA_HOME}/lib64:"* ]] && export LD_LIBRARY_PATH="${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}"
export OPENCV_INCDIR=/usr/include/opencv4
export OPENCV_LIBDIR=/usr/lib/x86_64-linux-gnu/
export LIBTORCH_DIR="/home/matthew/software/pythonVEnvs/myPy3.8.10/lib/python3.8/site-packages/torch"
export LIBTORCH_LIBDIR=${LIBTORCH_DIR}/lib
export LIBTORCH_INCDIR=${LIBTORCH_DIR}/include
[[ ":$LD_LIBRARY_PATH:" != *":${LIBTORCH_LIBDIR}:"* ]] && \
export LD_LIBRARY_PATH="${LIBTORCH_LIBDIR}:${LD_LIBRARY_PATH}"
elif [ $MACHINE == "singularity_minkowskiengine_u20.04.cu111.torch1.9.0_compute8_wjupyternotebook.sif" ]
then
echo "SETUP CONTAINER: singularity_minkowskiengine_u20.04.cu111.torch1.9.0_compute8_wjupyternotebook.sif"
source /usr/local/root/bin/thisroot.sh
export CUDA_HOME=/usr/local/cuda/
[[ ":$LD_LIBRARY_PATH:" != *":${CUDA_HOME}/lib64:"* ]] && export LD_LIBRARY_PATH="${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}"
export OPENCV_INCDIR=/usr/include
export OPENCV_LIBDIR=/usr/local/lib
# setting up xgboost copy in common area
#export XGBOOST_DIR=/cluster/tufts/wongjiradlabnu/nutufts/u20_software/xgboost/v1.4.0/
export XGBOOST_DIR=/home/twongjirad/working/larbys/gen2/container_u20_env/xgboost/
export XGBOOST_LIBDIR=${XGBOOST_DIR}/lib
export XGBOOST_INCDIR=${XGBOOST_DIR}/include
[[ ":$LD_LIBRARY_PATH:" != *":${XGBOOST_LIBDIR}:"* ]] && export LD_LIBRARY_PATH="${XGBOOST_LIBDIR}:${LD_LIBRARY_PATH}"
echo "Added XGBOOST_LIBDIR to LD Path: ${XGBOOST_LIBDIR}"
echo "LD PATH: ${LD_LIBRARY_PATH}"
elif [ $MACHINE == "singularity_minkowski_u20.04.cu111.torch1.9.0_jupyter_xgboost.sif" ]
then
echo "SETUP CONTAINER: singularity_minkowski_u20.04.cu111.torch1.9.0_jupyter_xgboost.sif"
source /usr/local/root/bin/thisroot.sh
export CUDA_HOME=/usr/local/cuda/
[[ ":$LD_LIBRARY_PATH:" != *":${CUDA_HOME}/lib64:"* ]] && export LD_LIBRARY_PATH="${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}"
export OPENCV_INCDIR=/usr/include
export OPENCV_LIBDIR=/usr/local/lib
# setting up xgboost copy in common area
export XGBOOST_DIR=/usr/local/lib/cmake/xgboost
export XGBOOST_LIBDIR=/usr/local/lib
export XGBOOST_INCDIR=/usr/local//include
[[ ":$LD_LIBRARY_PATH:" != *":${XGBOOST_LIBDIR}:"* ]] && export LD_LIBRARY_PATH="${XGBOOST_LIBDIR}:${LD_LIBRARY_PATH}"
echo "Added XGBOOST_LIBDIR to LD Path: ${XGBOOST_LIBDIR}"
echo "LD PATH: ${LD_LIBRARY_PATH}"
export JUPYTER_CONFIG_DIR=~/.local/etc/jupyter
elif [ $MACHINE == "ubdl_dlgen2_u22.04_torch2.4.0_me_xgboost.sif" ]
then
echo "SETUP FOR CONTAINER: ubdl_dlgen2_u22.04_torch2.4.0_me_xgboost.sif"
source /usr/local/bin/thisroot.sh
export CUDA_HOME=/usr/local/cuda/
[[ ":$LD_LIBRARY_PATH:" != *":${CUDA_HOME}/lib64:"* ]] && export LD_LIBRARY_PATH="${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}"
export OPENCV_INCDIR=/usr/include/opencv4/
export OPENCV_LIBDIR=/usr/lib/x86_64-linux-gnu/
export JUPYTER_CONFIG_DIR=~/.local/etc/jupyter
else
echo "DEFAULT SETUP (COMPAT WITH SINGULARITY CONTAINER)"
source /usr/local/root/bin/thisroot.sh
export CUDA_HOME=/usr/local/cuda/
[[ ":$LD_LIBRARY_PATH:" != *":${CUDA_HOME}/lib64:"* ]] && export LD_LIBRARY_PATH="${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}"
export OPENCV_INCDIR=/usr/include
export OPENCV_LIBDIR=/usr/local/lib
fi
# LIBTORCH
# location below is typically where running `pip install torch` will put pytorch
# export LIBTORCH_DIR="/usr/local/lib/python2.7/dist-packages/torch"
#export LIBTORCH_DIR="/home/jmills/.local/lib/python3.5/site-packages/torch"
#export LIBTORCH_LIBDIR=${LIBTORCH_DIR}/lib
#export LIBTORCH_INCDIR=${LIBTORCH_DIR}/lib/include
#export LIBTORCH_DIR="/usr/local/torchlib"
#export LIBTORCH_LIBDIR=${LIBTORCH_DIR}/lib
#export LIBTORCH_INCDIR=${LIBTORCH_DIR}/include
#[[ ":$LD_LIBRARY_PATH:" != *":${LIBTORCH_LIBDIR}:"* ]] && \
# export LD_LIBRARY_PATH="${LIBTORCH_LIBDIR}:${LD_LIBRARY_PATH}"