Skip to content

Commit 78325a3

Browse files
authored
Merge pull request #16 from willirath/env-dkrz
Env for DKRZ
2 parents 5945086 + ddc6010 commit 78325a3

3 files changed

Lines changed: 427 additions & 1 deletion

File tree

dkrz_setup_impfilt_env.sh

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/usr/bin/env bash
2+
3+
# init conda dirs to avoid filling up $HOME
4+
module load python3
5+
conda config --add envs_dirs $WORK/conda/envs
6+
conda config --add pkgs_dirs $WORK/conda/pkgs
7+
conda config --set auto_activate_base false
8+
eval "$(conda shell.bash activate base)"
9+
10+
# install env
11+
mamba env create -n impfilt -f environment.yml
12+
13+
# install implicit filter in env
14+
eval "$(conda shell.bash activate impfilt)"
15+
python -m pip install .
16+
17+
# install jupyter kernel
18+
python -m ipykernel install --user --name impfilt --display-name="impfilt"
19+
20+
# override kernel def with one that ensures proper activation of the env
21+
cat > $HOME/.local/share/jupyter/kernels/impfilt/kernel.json <<EOF
22+
{
23+
"argv": [
24+
"conda",
25+
"run",
26+
"-n",
27+
"impfilt",
28+
"python",
29+
"-m",
30+
"ipykernel_launcher",
31+
"-f",
32+
"{connection_file}"
33+
],
34+
"display_name": "impfilt",
35+
"language": "python",
36+
"metadata": {
37+
"debugger": true
38+
}
39+
}
40+
EOF

environment.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ name: implicit_filter
22
channels:
33
- conda-forge
44
dependencies:
5-
- python>=3.9
5+
- python
6+
- cupy
7+
- ipykernel
68
- pip
79
- pip:
810
- -r requirements.txt

examples/dkrz_gpu.ipynb

Lines changed: 384 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)