Skip to content

Commit 7363f18

Browse files
authored
Merge pull request #135 from /issues/133/gpu
add setup for desc-python-gpu
2 parents 066e1ba + 33077d9 commit 7363f18

4 files changed

Lines changed: 72 additions & 0 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"argv": [
3+
"/global/common/software/lsst/common/miniconda/kernels/python-gpu.sh",
4+
"-f",
5+
"{connection_file}"
6+
],
7+
"display_name": "desc-python-gpu",
8+
"language": "python"
9+
}
10+
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
INST_DIR=/global/common/software/lsst/common/miniconda
4+
source $INST_DIR/setup_gpu_python.sh ""
5+
6+
if [ $# -gt 0 ] ; then
7+
exec python -m ipykernel $@
8+
fi
9+
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#!/bin/bash
2+
3+
function log () {
4+
if [[ $_V -eq 1 ]]; then
5+
echo "$@"
6+
fi
7+
}
8+
9+
_V=0
10+
while getopts "v" OPTION
11+
do
12+
case $OPTION in
13+
v) _V=1
14+
;;
15+
esac
16+
done
17+
18+
export LSST_INST_DIR=/global/common/software/lsst/common/miniconda
19+
export LSST_PYTHON_VER=gpu
20+
21+
module load PrgEnv-gnu
22+
module load gpu
23+
# module load cpu
24+
# module load cudatoolkit
25+
# module load cray-mpich-abi/8.1.24
26+
27+
28+
unset PYTHONHOME
29+
unset PYTHONPATH
30+
export PYTHONNOUSERSITE=' '
31+
32+
export DESC_GCR_SITE='nersc'
33+
34+
source $LSST_INST_DIR/$LSST_PYTHON_VER/etc/profile.d/conda.sh
35+
conda activate base
36+
if [ -n "$DESCUSERENV" ]; then
37+
conda activate $DESCUSERENV
38+
fi
39+
40+
if [ -n "$DESCPYTHONPATH" ]; then
41+
export PYTHONPATH=$PYTHONPATH:"$DESCPYTHONPATH"
42+
echo "Including user python path: $DESCPYTHONPATH"
43+
fi
44+
45+
export PYTHONPATH=$PYTHONPATH:$LSST_INST_DIR/$LSST_PYTHON_VER
46+
47+
OUTPUTPY="$(which python)"
48+
echo Now using "${OUTPUTPY}"
49+
50+
export HDF5_USE_FILE_LOCKING=FALSE
51+
52+

jupyter-kernels/setup/user_setup.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ INST_DIR=/global/common/software/lsst/common/miniconda
1515
source $INST_DIR/setup_current_python.sh
1616
jupyter kernelspec install $INST_DIR/kernels/desc-python --user
1717
jupyter kernelspec install $INST_DIR/kernels/desc-python-dev --user
18+
jupyter kernelspec install $INST_DIR/kernels/desc-python-gpu --user
1819
jupyter kernelspec install $INST_DIR/kernels/desc-python-bleed --user
1920
jupyter kernelspec install $INST_DIR/kernels/desc-python-old --user
2021
jupyter kernelspec install $INST_DIR/kernels/desc-python-img --user

0 commit comments

Comments
 (0)