Skip to content

Commit 6206f15

Browse files
authored
Merge pull request #616 from DeepRank/set_deps_versions
build: make dependencies versions more reliable
2 parents 5e1098f + 602354f commit 6206f15

File tree

7 files changed

+344
-31
lines changed

7 files changed

+344
-31
lines changed

.github/actions/install-python-and-package/action.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,19 @@ runs:
3939
activate-environment: deeprank2
4040
environment-file: env/deeprank2.yml
4141
use-mamba: true
42+
if: ${{ inputs.pkg-installation-type != 'frozen' }}
43+
44+
- name: Setup miniconda with frozen dependencies
45+
uses: conda-incubator/setup-miniconda@v2
46+
with:
47+
auto-update-conda: true
48+
miniforge-variant: Mambaforge
49+
channels: conda-forge
50+
python-version: ${{ inputs.python-version }}
51+
activate-environment: deeprank2
52+
environment-file: env/deeprank2_frozen.yml
53+
use-mamba: true
54+
if: ${{ inputs.pkg-installation-type == 'frozen' }}
4255

4356
- run: |
4457
conda --version
@@ -53,7 +66,7 @@ runs:
5366
5467
- name: Install the GitHub repository version of the package
5568
shell: bash -l {0}
56-
if: ${{ inputs.pkg-installation-type == 'repository' }}
69+
if: ${{ inputs.pkg-installation-type == 'repository' || inputs.pkg-installation-type == 'frozen' }}
5770
run: |
5871
conda activate deeprank2
5972
pip install .'[${{ inputs.extras-require }}]'
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: build (repository package) using the frozen environment
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
# specific folder locations
7+
- ".vscode/**"
8+
- "docs/**"
9+
# filetypes
10+
- "**.md"
11+
- "**.rst"
12+
- "**.ipynb"
13+
- "**.cff"
14+
- "**.png"
15+
branches:
16+
- main
17+
pull_request:
18+
types: [opened, synchronize, reopened, ready_for_review]
19+
paths-ignore:
20+
# specific folder locations
21+
- ".vscode/**"
22+
- "docs/**"
23+
# filetypes
24+
- "**.md"
25+
- "**.rst"
26+
- "**.ipynb"
27+
- "**.cff"
28+
- "**.png"
29+
30+
jobs:
31+
build:
32+
if: github.event.pull_request.draft == false
33+
name: Build for (${{ matrix.python-version }}, ${{ matrix.os }})
34+
runs-on: ${{ matrix.os }}
35+
36+
strategy:
37+
fail-fast: false
38+
matrix:
39+
os: ["ubuntu-latest"]
40+
python-version: ["3.10"] # ["3.10", "3.11"]
41+
42+
# https://github.com/marketplace/actions/setup-miniconda#use-a-default-shell
43+
defaults:
44+
run:
45+
shell: bash -l {0}
46+
47+
steps:
48+
- uses: actions/checkout@v3
49+
50+
- uses: ./.github/actions/install-python-and-package
51+
with:
52+
python-version: ${{ matrix.python-version }}
53+
extras-require: test, publishing
54+
pkg-installation-type: "frozen"
55+
56+
- name: Run unit tests
57+
run: pytest -v
58+
59+
- name: Verify that we can build the package
60+
run: python3 -m build

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ conda activate deeprank2
115115
pip install deeprank2
116116
```
117117

118+
We also provide a frozen environment YML file located at `env/deeprank2_frozen.yml` with all dependencies set to fixed versions. The `env/deeprank2_frozen.yml` file provides a frozen environment with all dependencies set to fixed versions. This ensures reproducibility of experiments and results by preventing changes in package versions that could occur due to updates or modifications in the default `env/deeprank2.yml`. Use this frozen environment file for a stable and consistent setup, particularly if you encounter issues with the default environment file.
119+
118120
#### Manual installation (customizable)
119121

120122
If you want to use the GPUs, choose a specific python version (note that at the moment we support python 3.10 only), are a MacOS user, or if the YML installation was not successful, you can install the package manually. We advise to do this inside a [conda virtual environment](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html).

docs/installation.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ conda activate deeprank2
6161
pip install deeprank2
6262
```
6363

64+
We also provide a frozen environment YML file located at `env/deeprank2_frozen.yml` with all dependencies set to fixed versions. The `env/deeprank2_frozen.yml` file provides a frozen environment with all dependencies set to fixed versions. This ensures reproducibility of experiments and results by preventing changes in package versions that could occur due to updates or modifications in the default `env/deeprank2.yml`. Use this frozen environment file for a stable and consistent setup, particularly if you encounter issues with the default environment file.
65+
6466
#### Manual installation (customizable)
6567

6668
If you want to use the GPUs, choose a specific python version (note that at the moment we support python 3.10 only), are a MacOS user, or if the YML installation was not successful, you can install the package manually. We advise to do this inside a [conda virtual environment](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html).

env/deeprank2.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@ channels:
77
- conda-forge
88
- sbl
99
dependencies:
10-
- sbl::libcifpp>=5.1.0
11-
- sbl::dssp>=4.2.2.1
12-
- msms>=2.6.1
10+
- python=3.10
11+
- pip>=23.3
12+
- sbl::libcifpp=5.1.0
13+
- sbl::dssp=4.2.2.1
14+
- msms=2.6.1
1315
- pytorch=2.1.1
1416
- torchvision>=0.16.1
1517
- torchaudio>=2.1.1
1618
- cpuonly>=2.0
17-
- pyg>=2.4.0
19+
- pyg=2.4.0
1820
- pytorch-scatter>=2.1.2
1921
- pytorch-sparse>=0.6.18
2022
- pytorch-cluster>=1.6.3

env/deeprank2_frozen.yml

Lines changed: 234 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,234 @@
1+
name: deeprank2
2+
channels:
3+
- pyg
4+
- bioconda
5+
- sbl
6+
- pytorch
7+
- defaults
8+
- conda-forge
9+
dependencies:
10+
- _libgcc_mutex=0.1=conda_forge
11+
- _openmp_mutex=4.5=2_gnu
12+
- blas=1.0=mkl
13+
- brotli-python=1.0.9=py310h6a678d5_8
14+
- bzip2=1.0.8=h5eee18b_6
15+
- ca-certificates=2024.3.11=h06a4308_0
16+
- certifi=2024.6.2=py310h06a4308_0
17+
- charset-normalizer=2.0.4=pyhd3eb1b0_0
18+
- cpuonly=2.0=0
19+
- dssp=4.2.2.1=h3fd9d12_0
20+
- ffmpeg=4.3=hf484d3e_0
21+
- filelock=3.13.1=py310h06a4308_0
22+
- freetype=2.12.1=h4a9f257_0
23+
- gmp=6.2.1=h295c915_3
24+
- gmpy2=2.1.2=py310heeb90bb_0
25+
- gnutls=3.6.15=he1e5248_0
26+
- idna=3.7=py310h06a4308_0
27+
- intel-openmp=2023.1.0=hdb19cb5_46306
28+
- jinja2=3.1.4=py310h06a4308_0
29+
- joblib=1.4.2=py310h06a4308_0
30+
- jpeg=9e=h5eee18b_1
31+
- lame=3.100=h7b6447c_0
32+
- lcms2=2.12=h3be6417_0
33+
- ld_impl_linux-64=2.38=h1181459_1
34+
- lerc=3.0=h295c915_0
35+
- libcifpp=5.1.0=hf65b397_0
36+
- libdeflate=1.17=h5eee18b_1
37+
- libffi=3.4.4=h6a678d5_1
38+
- libgcc-ng=13.2.0=h77fa898_11
39+
- libgfortran-ng=11.2.0=h00389a5_1
40+
- libgfortran5=11.2.0=h1234567_1
41+
- libgomp=13.2.0=h77fa898_11
42+
- libiconv=1.16=h5eee18b_3
43+
- libidn2=2.3.4=h5eee18b_0
44+
- libjpeg-turbo=2.0.0=h9bf148f_0
45+
- libmcfp=1.2.3=h3fd9d12_0
46+
- libpng=1.6.39=h5eee18b_0
47+
- libstdcxx-ng=13.2.0=hc0a3c3a_11
48+
- libtasn1=4.19.0=h5eee18b_0
49+
- libtiff=4.5.1=h6a678d5_0
50+
- libunistring=0.9.10=h27cfd23_0
51+
- libuuid=1.41.5=h5eee18b_0
52+
- libwebp-base=1.3.2=h5eee18b_0
53+
- libzlib=1.2.13=h4ab18f5_6
54+
- llvm-openmp=14.0.6=h9e868ea_0
55+
- lz4-c=1.9.4=h6a678d5_1
56+
- markupsafe=2.1.3=py310h5eee18b_0
57+
- mkl=2023.1.0=h213fc3f_46344
58+
- mkl-service=2.4.0=py310h5eee18b_1
59+
- mkl_fft=1.3.8=py310h5eee18b_0
60+
- mkl_random=1.2.4=py310hdb19cb5_0
61+
- mpc=1.1.0=h10f8cd9_1
62+
- mpfr=4.0.2=hb69a4c5_1
63+
- mpmath=1.3.0=py310h06a4308_0
64+
- msms=2.6.1=h9ee0642_3
65+
- ncurses=6.4=h6a678d5_0
66+
- nettle=3.7.3=hbbd107a_1
67+
- networkx=3.2.1=py310h06a4308_0
68+
- numpy=1.26.4=py310h5f9d8c6_0
69+
- numpy-base=1.26.4=py310hb5e798b_0
70+
- openh264=2.1.1=h4ff587b_0
71+
- openjpeg=2.4.0=h3ad879b_0
72+
- openssl=3.0.14=h5eee18b_0
73+
- pillow=10.3.0=py310h5eee18b_0
74+
- pip=24.0=py310h06a4308_0
75+
- psutil=5.9.0=py310h5eee18b_0
76+
- pybind11-abi=4=hd3eb1b0_1
77+
- pyg=2.4.0=py310_torch_2.1.0_cpu
78+
- pyparsing=3.0.9=py310h06a4308_0
79+
- pysocks=1.7.1=py310h06a4308_0
80+
- python=3.10.14=h955ad1f_1
81+
- pytorch=2.1.1=py3.10_cpu_0
82+
- pytorch-cluster=1.6.3=py310_torch_2.1.0_cpu
83+
- pytorch-mutex=1.0=cpu
84+
- pytorch-scatter=2.1.2=py310_torch_2.1.0_cpu
85+
- pytorch-sparse=0.6.18=py310_torch_2.1.0_cpu
86+
- pytorch-spline-conv=1.2.2=py310_torch_2.1.0_cpu
87+
- pyyaml=6.0.1=py310h5eee18b_0
88+
- readline=8.2=h5eee18b_0
89+
- requests=2.32.2=py310h06a4308_0
90+
- scipy=1.13.1=py310h5f9d8c6_0
91+
- setuptools=69.5.1=py310h06a4308_0
92+
- sqlite=3.45.3=h5eee18b_0
93+
- sympy=1.12=py310h06a4308_0
94+
- tbb=2021.8.0=hdb19cb5_0
95+
- tk=8.6.14=h39e8969_0
96+
- torchaudio=2.1.1=py310_cpu
97+
- torchvision=0.16.1=py310_cpu
98+
- tqdm=4.66.4=py310h2f386ee_0
99+
- typing_extensions=4.11.0=py310h06a4308_0
100+
- urllib3=2.2.2=py310h06a4308_0
101+
- wheel=0.43.0=py310h06a4308_0
102+
- xz=5.4.6=h5eee18b_1
103+
- yaml=0.2.5=h7b6447c_0
104+
- zlib=1.2.13=h4ab18f5_6
105+
- zstd=1.5.5=hc292b87_2
106+
- pip:
107+
- absl-py==2.1.0
108+
- anyio==4.4.0
109+
- argon2-cffi==23.1.0
110+
- argon2-cffi-bindings==21.2.0
111+
- arrow==1.3.0
112+
- asttokens==2.4.1
113+
- async-lru==2.0.4
114+
- attrs==23.2.0
115+
- babel==2.15.0
116+
- beautifulsoup4==4.12.3
117+
- biopython==1.83
118+
- bleach==6.1.0
119+
- blosc2==2.7.0
120+
- bump2version==1.0.1
121+
- cffi==1.16.0
122+
- chart-studio==1.1.0
123+
- comm==0.2.2
124+
- contourpy==1.2.1
125+
- coverage==6.5.0
126+
- coveralls==3.3.1
127+
- cycler==0.12.1
128+
- debugpy==1.8.1
129+
- decorator==5.1.1
130+
- defusedxml==0.7.1
131+
- dill==0.3.8
132+
- docopt==0.6.2
133+
- exceptiongroup==1.2.1
134+
- executing==2.0.1
135+
- fastjsonschema==2.20.0
136+
- fonttools==4.53.0
137+
- fqdn==1.5.1
138+
- freesasa==2.2.1
139+
- grpcio==1.64.1
140+
- h11==0.14.0
141+
- h5py==3.11.0
142+
- httpcore==1.0.5
143+
- httpx==0.27.0
144+
- iniconfig==2.0.0
145+
- ipykernel==6.29.4
146+
- ipython==8.25.0
147+
- isoduration==20.11.0
148+
- jedi==0.19.1
149+
- json5==0.9.25
150+
- jsonpointer==3.0.0
151+
- jsonschema==4.22.0
152+
- jsonschema-specifications==2023.12.1
153+
- jupyter-client==8.6.2
154+
- jupyter-core==5.7.2
155+
- jupyter-events==0.10.0
156+
- jupyter-lsp==2.2.5
157+
- jupyter-server==2.14.1
158+
- jupyter-server-terminals==0.5.3
159+
- jupyterlab==4.2.2
160+
- jupyterlab-pygments==0.3.0
161+
- jupyterlab-server==2.27.2
162+
- kiwisolver==1.4.5
163+
- markdown==3.6
164+
- markov-clustering==0.0.6.dev0
165+
- matplotlib==3.9.0
166+
- matplotlib-inline==0.1.7
167+
- mistune==3.0.2
168+
- msgpack==1.0.8
169+
- nbclient==0.10.0
170+
- nbconvert==7.16.4
171+
- nbformat==5.10.4
172+
- ndindex==1.8
173+
- nest-asyncio==1.6.0
174+
- notebook==7.2.1
175+
- notebook-shim==0.2.4
176+
- numexpr==2.10.1
177+
- overrides==7.7.0
178+
- packaging==24.1
179+
- pandas==2.2.2
180+
- pandocfilters==1.5.1
181+
- parso==0.8.4
182+
- pdb2sql==0.5.3
183+
- pexpect==4.9.0
184+
- platformdirs==4.2.2
185+
- plotly==5.22.0
186+
- pluggy==1.5.0
187+
- prometheus-client==0.20.0
188+
- prompt-toolkit==3.0.47
189+
- protobuf==4.25.3
190+
- ptyprocess==0.7.0
191+
- pure-eval==0.2.2
192+
- py-cpuinfo==9.0.0
193+
- pyarrow==16.1.0
194+
- pycodestyle==2.12.0
195+
- pycparser==2.22
196+
- pygments==2.18.0
197+
- pytest==7.4.4
198+
- pytest-cov==4.1.0
199+
- pytest-runner==6.0.1
200+
- python-dateutil==2.9.0.post0
201+
- python-json-logger==2.0.7
202+
- python-louvain==0.16
203+
- pytz==2024.1
204+
- pyzmq==26.0.3
205+
- referencing==0.35.1
206+
- retrying==1.3.4
207+
- rfc3339-validator==0.1.4
208+
- rfc3986-validator==0.1.1
209+
- rpds-py==0.18.1
210+
- ruff==0.4.10
211+
- scikit-learn==1.5.0
212+
- send2trash==1.8.3
213+
- six==1.16.0
214+
- sniffio==1.3.1
215+
- soupsieve==2.5
216+
- stack-data==0.6.3
217+
- tables==3.9.2
218+
- tenacity==8.4.1
219+
- tensorboard==2.17.0
220+
- tensorboard-data-server==0.7.2
221+
- terminado==0.18.1
222+
- threadpoolctl==3.5.0
223+
- tinycss2==1.3.0
224+
- tomli==2.0.1
225+
- tornado==6.4.1
226+
- traitlets==5.14.3
227+
- types-python-dateutil==2.9.0.20240316
228+
- tzdata==2024.1
229+
- uri-template==1.3.0
230+
- wcwidth==0.2.13
231+
- webcolors==24.6.0
232+
- webencodings==0.5.1
233+
- websocket-client==1.8.0
234+
- werkzeug==3.0.3

0 commit comments

Comments
 (0)