@@ -3,7 +3,6 @@ name: "Install Python and DeepRank2"
3
3
description : " Installs Python, updates pip and installs DeepRank2 together with its dependencies."
4
4
5
5
inputs :
6
-
7
6
python-version :
8
7
required : false
9
8
description : " The Python version to use. Specify major and minor version, e.g. '3.10'."
@@ -14,23 +13,29 @@ inputs:
14
13
description : " The extras dependencies packages to be installed, for instance 'dev' or 'dev,publishing,notebooks'."
15
14
default : " test"
16
15
17
- runs :
16
+ pkg-installation-type :
17
+ required : false
18
+ description : " The package installation type to install, the latest released version on PyPI ('latest') or the GitHub repository one ('repository')."
19
+ default : " repository"
18
20
21
+ runs :
19
22
using : " composite"
20
23
21
24
steps :
22
25
- name : Cancel Previous Runs and Set up Python
23
26
24
27
with :
25
- access_token : ${{ github.token }}
28
+ access_token : ${{ github.token }}
26
29
- uses : actions/checkout@v3
27
30
- name : Setup conda
28
31
uses : s-weigand/setup-conda@v1
29
32
with :
30
33
update-conda : true
31
34
python-version : ${{ inputs.python-version }}
32
- conda-channels : anaconda
33
- - run : conda --version
35
+ conda-channels : pytorch, pyg, bioconda, defaults, sbl, conda-forge
36
+ - run : |
37
+ conda --version
38
+ conda env list
34
39
shell: bash {0}
35
40
- name : Python info
36
41
shell : bash -e {0}
@@ -43,44 +48,25 @@ runs:
43
48
CMAKE_INSTALL_PREFIX : .local
44
49
if : runner.os == 'Linux'
45
50
run : |
46
- # Install dependencies not handled by setuptools
51
+ # Install deeprank2 conda dependencies
47
52
## DSSP
48
- sudo apt-get install -y dssp
53
+ conda install -c sbl dssp>=4.2.2.1
49
54
## MSMS
50
- conda install -c bioconda msms
55
+ conda install -c bioconda msms>=2.6.1
51
56
## PyTorch, PyG, PyG adds
52
57
### Installing for CPU only on the CI
53
- conda install pytorch torchvision torchaudio cpuonly -c pytorch
54
- conda install pyg -c pyg
55
- pip install torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-$(python3 -c "import torch; print(torch.__version__)") +cpu.html
58
+ conda install pytorch=2.1.1 torchvision=0.16.1 torchaudio=2.1.1 cpuonly=2.0.* -c pytorch
59
+ conda install pyg=2.4.0 -c pyg
60
+ pip install torch_scatter==2.1.2 torch_sparse==0.6.18 torch_cluster==1.6.3 torch_spline_conv==1.2.2 -f https://data.pyg.org/whl/torch-2.1.0 +cpu.html
56
61
- name : Install dependencies on MacOS
57
62
shell : bash {0}
58
63
env :
59
64
CMAKE_INSTALL_PREFIX : .local
60
65
if : runner.os == 'macOS'
61
66
run : |
62
- # Install dependencies not handled by setuptools
67
+ # Install dependencies not handled by setuptools
63
68
## DSSP
64
- git clone https://github.com/PDB-REDO/libcifpp.git --recurse-submodules
65
- cd libcifpp
66
- cmake -S . -B build -DCMAKE_INSTALL_PREFIX=$HOME/.local -DCMAKE_BUILD_TYPE=Release
67
- cmake --build build
68
- cmake --install build
69
- #######
70
- git clone https://github.com/mhekkel/libmcfp.git
71
- cd libmcfp
72
- mkdir build
73
- cd build
74
- cmake ..
75
- cmake --build .
76
- cmake --install .
77
- #######
78
- git clone https://github.com/PDB-REDO/dssp.git
79
- cd dssp
80
- mkdir build
81
- cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
82
- cmake --build build
83
- cmake --install build
69
+ conda install -c sbl dssp>=4.2.2.1
84
70
## MSMS
85
71
cd /tmp/
86
72
wget http://mgltools.scripps.edu/downloads/tars/releases/MSMSRELEASE/REL2.6.1/msms_i86Linux2_2.6.1.tar.gz
96
82
pip install torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-$(python3 -c "import torch; print(torch.__version__)")+cpu.html
97
83
# PyTables via conda only for MacOS
98
84
conda install pytables
99
- - name : Install the package
85
+ - name : Install the GitHub repository version of the package
100
86
shell : bash {0}
87
+ if : ${{ inputs.pkg-installation-type == 'repository' }}
101
88
run : pip install .'[${{ inputs.extras-require }}]'
89
+ - name : Install the latest released version of the package
90
+ shell : bash {0}
91
+ if : ${{ inputs.pkg-installation-type == 'latest' }}
92
+ run : |
93
+ pip install pytest
94
+ rm -r deeprank2
95
+ pip install deeprank2
0 commit comments