File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change @@ -2,7 +2,9 @@ name: implicit_filter
22channels :
33 - conda-forge
44dependencies :
5- - python>=3.9
5+ - python
6+ - cupy
7+ - ipykernel
68 - pip
79 - pip :
810 - -r requirements.txt
Load Diff Large diffs are not rendered by default.
You can’t perform that action at this time.
0 commit comments