From 3cb18970ce39b92c8833b7eab02815f86994d0fc Mon Sep 17 00:00:00 2001 From: gcroci2 Date: Thu, 20 Jun 2024 16:14:52 +0200 Subject: [PATCH 1/5] remove unnecessary files --- Dockerfile | 7 +++--- env/deeprank2-docker.yml | 43 ------------------------------------- env/requirements-docker.txt | 1 - 3 files changed, 3 insertions(+), 48 deletions(-) delete mode 100644 env/deeprank2-docker.yml delete mode 100644 env/requirements-docker.txt diff --git a/Dockerfile b/Dockerfile index 87d47733..c2a84df3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,8 +3,7 @@ FROM --platform=linux/x86_64 condaforge/miniforge3:23.3.1-1 # Add files ADD ./tutorials /home/deeprank2/tutorials -ADD ./env/deeprank2-docker.yml /home/deeprank2 -ADD ./env/requirements-docker.txt /home/deeprank2 +ADD ./env/deeprank2.yml /home/deeprank2 RUN \ # Install dependencies and package @@ -13,9 +12,9 @@ RUN \ ## GCC apt install -y gcc && \ ## Create the environment and install the dependencies - mamba env create -f /home/deeprank2/deeprank2-docker.yml && \ + mamba env create -f /home/deeprank2/deeprank2.yml && \ ## Activate the environment and install pip packages - /opt/conda/bin/conda run -n deeprank2 pip install -r /home/deeprank2/requirements-docker.txt && \ + /opt/conda/bin/conda run -n deeprank2 pip install deeprank2 && \ ## Activate the environment automatically when entering the container echo "source activate deeprank2" >~/.bashrc && \ # Get the data for running the tutorials diff --git a/env/deeprank2-docker.yml b/env/deeprank2-docker.yml deleted file mode 100644 index e73ab82d..00000000 --- a/env/deeprank2-docker.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: deeprank2 -channels: - - pytorch - - pyg - - bioconda - - defaults - - conda-forge - - sbl -dependencies: - - python==3.10 - - pip>=23.3 - - notebook>=7.0.6 - - sbl::libcifpp>=5.1.0 - - sbl::dssp>=4.2.2.1 - - msms>=2.6.1 - - markov_clustering>=0.0.6 - - pytorch=2.1.1 - - torchvision>=0.16.1 - - torchaudio>=2.1.1 - - cpuonly>=2.0 - - pyg>=2.4.0 - - pytorch-scatter>=2.1.2 - - pytorch-sparse>=0.6.18 - - pytorch-cluster>=1.6.3 - - pytorch-spline-conv>=1.2.2 - - tables>=3.8.0 - - numpy>=1.21.5 - - scipy>=1.13.1 - - h5py>=3.6.0 - - networkx>=2.6.3 - - matplotlib>=3.5.1 - - scikit-learn>=1.0.2 - - chart-studio>=1.1.0 - - biopython>=1.81 - - pdb2sql>=0.5.1 - - python-louvain>=0.16 - - tqdm>=4.63.0 - - freesasa>=2.1.0 - - tensorboard>=0.9.0 - - protobuf>=3.20.1 - - ruff>=0.3.0 - - dill>=0.3.8 - - pyarrow>=15.0.0 diff --git a/env/requirements-docker.txt b/env/requirements-docker.txt deleted file mode 100644 index b6806165..00000000 --- a/env/requirements-docker.txt +++ /dev/null @@ -1 +0,0 @@ -deeprank2==3.0.4 \ No newline at end of file From d424a26d62dc21513297ac9ae2306fba4b4d7bfd Mon Sep 17 00:00:00 2001 From: gcroci2 Date: Fri, 21 Jun 2024 10:47:16 +0200 Subject: [PATCH 2/5] improve install instructions --- README.md | 10 ++-------- docs/installation.md | 16 +++++----------- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 4482c0d7..e74f4553 100644 --- a/README.md +++ b/README.md @@ -107,14 +107,8 @@ This will install the CPU-only version of DeepRank2 on Python 3.10. Note that this will not work for MacOS. Do the [Manual Installation](#manual-installation) instead. ```bash -# Clone the DeepRank2 repository and enter its root directory -git clone https://github.com/DeepRank/deeprank2 -cd deeprank2 - -# Ensure you are in your base environment -conda activate # Create the environment -conda env create -f env/deeprank2.yml +conda env create -f https://raw.githubusercontent.com/DeepRank/deeprank2/main/env/deeprank2.yml # Activate the environment conda activate deeprank2 # Install the latest deeprank2 release @@ -127,7 +121,7 @@ See instructions below to [test](#testing-deeprank2-installation) that the insta If you want to use the GPUs, choose a specific python version, 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). -You can first remove from `env/deeprank2.yml` the packages that cannot be installed properly, or the ones that you want to install differently (e.g., pytorch-related packages if you wish to install the CUDA version), and then proceed with the environment creation by using the edited YML file: `conda env create -f env/deeprank2.yml`. Then activate the environment, and proceed with installing the missing packages, which might fall into the following list. If you have any issues during installation of dependencies, please refer to the official documentation for each package (linked below), as our instructions may be out of date (last tested on 19 Feb 2024): +You can first create a copy of the `deeprank2.yml` file, place it in your current directory, and remove the packages that cannot be installed properly, or the ones that you want to install differently (e.g., pytorch-related packages if you wish to install the CUDA version), and then proceed with the environment creation by using the edited YML file: `conda env create -f deeprank2.yml`. Then activate the environment, and proceed with installing the missing packages, which might fall into the following list. If you have any issues during installation of dependencies, please refer to the official documentation for each package (linked below), as our instructions may be out of date (last tested on 19 Feb 2024): - [MSMS](https://anaconda.org/bioconda/msms): [Here](https://ssbio.readthedocs.io/en/latest/instructions/msms.html) for MacOS with M1 chip users. - [PyTorch](https://pytorch.org/get-started/locally/) diff --git a/docs/installation.md b/docs/installation.md index 394a28d0..dcbc62ca 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -4,9 +4,9 @@ - [Installation](#installation) - [Containerized Installation](#containerized-installation) - [Local/remote installation](#localremote-installation) - - [YML file installation (recommended)](#yml-file-installation-recommended) - - [Manual installation (customizable)](#manual-installation-customizable) - - [Testing DeepRank2 installation](#testing-deeprank2-installation) + - [YML file installation (recommended)](#yml-file-installation-recommended) + - [Manual installation (customizable)](#manual-installation-customizable) + - [Testing DeepRank2 installation](#testing-deeprank2-installation) - [Contributing](#contributing) # Installation @@ -53,14 +53,8 @@ This will install the CPU-only version of DeepRank2 on Python 3.10. Note that this will not work for MacOS. Do the [Manual Installation](#manual-installation) instead. ```bash -# Clone the DeepRank2 repository and enter its root directory -git clone https://github.com/DeepRank/deeprank2 -cd deeprank2 - -# Ensure you are in your base environment -conda activate # Create the environment -conda env create -f env/deeprank2.yml +conda env create -f https://raw.githubusercontent.com/DeepRank/deeprank2/main/env/deeprank2.yml # Activate the environment conda activate deeprank2 # Install the latest deeprank2 release @@ -73,7 +67,7 @@ See instructions below to [test](#testing-deeprank2-installation) that the insta If you want to use the GPUs, choose a specific python version, 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). -You can first remove from `env/deeprank2.yml` the packages that cannot be installed properly, or the ones that you want to install differently (e.g., pytorch-related packages if you wish to install the CUDA version), and then proceed with the environment creation by using the edited YML file: `conda env create -f env/deeprank2.yml`. Then activate the environment, and proceed with installing the missing packages, which might fall into the following list. If you have any issues during installation of dependencies, please refer to the official documentation for each package (linked below), as our instructions may be out of date (last tested on 19 Feb 2024): +You can first create a copy of the `deeprank2.yml` file, place it in your current directory, and remove the packages that cannot be installed properly, or the ones that you want to install differently (e.g., pytorch-related packages if you wish to install the CUDA version), and then proceed with the environment creation by using the edited YML file: `conda env create -f deeprank2.yml`. Then activate the environment, and proceed with installing the missing packages, which might fall into the following list. If you have any issues during installation of dependencies, please refer to the official documentation for each package (linked below), as our instructions may be out of date (last tested on 19 Feb 2024): - [MSMS](https://anaconda.org/bioconda/msms): [Here](https://ssbio.readthedocs.io/en/latest/instructions/msms.html) for MacOS with M1 chip users. - [PyTorch](https://pytorch.org/get-started/locally/) From f21f5faa3d9e53e5a6ca0cadf27d0500cc9e4ae8 Mon Sep 17 00:00:00 2001 From: gcroci2 Date: Fri, 21 Jun 2024 16:05:18 +0200 Subject: [PATCH 3/5] add mamba to the installation instructions --- README.md | 8 ++++---- docs/installation.md | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index e74f4553..0911dfbf 100644 --- a/README.md +++ b/README.md @@ -102,13 +102,13 @@ Before installing DeepRank2 please ensure you have [GCC](https://gcc.gnu.org/ins #### YML file installation (recommended) -You can use the provided YML file for creating a [conda environment](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html) containing the latest stable release of DeepRank2 and all its dependencies. +You can use the provided YML file for creating a [conda environment](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html) via [mamba](https://mamba.readthedocs.io/en/latest/installation/mamba-installation.html), containing the latest stable release of DeepRank2 and all its dependencies. This will install the CPU-only version of DeepRank2 on Python 3.10. Note that this will not work for MacOS. Do the [Manual Installation](#manual-installation) instead. ```bash # Create the environment -conda env create -f https://raw.githubusercontent.com/DeepRank/deeprank2/main/env/deeprank2.yml +mamba env create -f https://raw.githubusercontent.com/DeepRank/deeprank2/main/env/deeprank2.yml # Activate the environment conda activate deeprank2 # Install the latest deeprank2 release @@ -119,9 +119,9 @@ See instructions below to [test](#testing-deeprank2-installation) that the insta #### Manual installation (customizable) -If you want to use the GPUs, choose a specific python version, 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). +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). -You can first create a copy of the `deeprank2.yml` file, place it in your current directory, and remove the packages that cannot be installed properly, or the ones that you want to install differently (e.g., pytorch-related packages if you wish to install the CUDA version), and then proceed with the environment creation by using the edited YML file: `conda env create -f deeprank2.yml`. Then activate the environment, and proceed with installing the missing packages, which might fall into the following list. If you have any issues during installation of dependencies, please refer to the official documentation for each package (linked below), as our instructions may be out of date (last tested on 19 Feb 2024): +You can first create a copy of the `deeprank2.yml` file, place it in your current directory, and remove the packages that cannot be installed properly, or the ones that you want to install differently (e.g., pytorch-related packages if you wish to install the CUDA version), and then proceed with the environment creation by using the edited YML file: `conda env create -f deeprank2.yml` or `mamba env create -f deeprank2.yml`, if you have [mamba](https://mamba.readthedocs.io/en/latest/installation/mamba-installation.html) installed. Then activate the environment, and proceed with installing the missing packages, which might fall into the following list. If you have any issues during installation of dependencies, please refer to the official documentation for each package (linked below), as our instructions may be out of date (last tested on 19 Feb 2024): - [MSMS](https://anaconda.org/bioconda/msms): [Here](https://ssbio.readthedocs.io/en/latest/instructions/msms.html) for MacOS with M1 chip users. - [PyTorch](https://pytorch.org/get-started/locally/) diff --git a/docs/installation.md b/docs/installation.md index dcbc62ca..68468247 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -48,13 +48,13 @@ Before installing DeepRank2 please ensure you have [GCC](https://gcc.gnu.org/ins #### YML file installation (recommended) -You can use the provided YML file for creating a [conda environment](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html) containing the latest stable release of DeepRank2 and all its dependencies. +You can use the provided YML file for creating a [conda environment](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html) via [mamba](https://mamba.readthedocs.io/en/latest/installation/mamba-installation.html), containing the latest stable release of DeepRank2 and all its dependencies. This will install the CPU-only version of DeepRank2 on Python 3.10. Note that this will not work for MacOS. Do the [Manual Installation](#manual-installation) instead. ```bash # Create the environment -conda env create -f https://raw.githubusercontent.com/DeepRank/deeprank2/main/env/deeprank2.yml +mamba env create -f https://raw.githubusercontent.com/DeepRank/deeprank2/main/env/deeprank2.yml # Activate the environment conda activate deeprank2 # Install the latest deeprank2 release @@ -65,9 +65,9 @@ See instructions below to [test](#testing-deeprank2-installation) that the insta #### Manual installation (customizable) -If you want to use the GPUs, choose a specific python version, 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). +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). -You can first create a copy of the `deeprank2.yml` file, place it in your current directory, and remove the packages that cannot be installed properly, or the ones that you want to install differently (e.g., pytorch-related packages if you wish to install the CUDA version), and then proceed with the environment creation by using the edited YML file: `conda env create -f deeprank2.yml`. Then activate the environment, and proceed with installing the missing packages, which might fall into the following list. If you have any issues during installation of dependencies, please refer to the official documentation for each package (linked below), as our instructions may be out of date (last tested on 19 Feb 2024): +You can first create a copy of the `deeprank2.yml` file, place it in your current directory, and remove the packages that cannot be installed properly, or the ones that you want to install differently (e.g., pytorch-related packages if you wish to install the CUDA version), and then proceed with the environment creation by using the edited YML file: `conda env create -f deeprank2.yml` or `mamba env create -f deeprank2.yml`, if you have [mamba](https://mamba.readthedocs.io/en/latest/installation/mamba-installation.html) installed. Then activate the environment, and proceed with installing the missing packages, which might fall into the following list. If you have any issues during installation of dependencies, please refer to the official documentation for each package (linked below), as our instructions may be out of date (last tested on 19 Feb 2024): - [MSMS](https://anaconda.org/bioconda/msms): [Here](https://ssbio.readthedocs.io/en/latest/instructions/msms.html) for MacOS with M1 chip users. - [PyTorch](https://pytorch.org/get-started/locally/) From e2a643c479193c2bb5d5efa59ef8d83b84dee380 Mon Sep 17 00:00:00 2001 From: gcroci2 Date: Mon, 1 Jul 2024 11:37:12 +0200 Subject: [PATCH 4/5] remove ref to tests --- README.md | 4 +--- docs/installation.md | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 0911dfbf..82f101a5 100644 --- a/README.md +++ b/README.md @@ -115,8 +115,6 @@ conda activate deeprank2 pip install deeprank2 ``` -See instructions below to [test](#testing-deeprank2-installation) that the installation was succesful. - #### Manual installation (customizable) 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). @@ -145,7 +143,7 @@ The `test` extra is optional, and can be used to install test-related dependenci #### Testing DeepRank2 installation -You can check that all components were installed correctly, using `pytest`. We especially recommend doing this in case you installed DeepRank2 and its dependencies manually (the latter option above). +If you have cloned the repository, you can check that all components were installed correctly using `pytest`. We especially recommend doing this in case you installed DeepRank2 and its dependencies manually (the latter option above). The quick test should be sufficient to ensure that the software works, while the full test (a few minutes) will cover a much broader range of settings to ensure everything is correct. diff --git a/docs/installation.md b/docs/installation.md index 68468247..282d5a26 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -61,8 +61,6 @@ conda activate deeprank2 pip install deeprank2 ``` -See instructions below to [test](#testing-deeprank2-installation) that the installation was succesful. - #### Manual installation (customizable) 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). @@ -91,7 +89,7 @@ The `test` extra is optional, and can be used to install test-related dependenci #### Testing DeepRank2 installation -You can check that all components were installed correctly, using `pytest`. We especially recommend doing this in case you installed DeepRank2 and its dependencies manually (the latter option above). +If you have cloned the repository, you can check that all components were installed correctly using `pytest`. We especially recommend doing this in case you installed DeepRank2 and its dependencies manually (the latter option above). The quick test should be sufficient to ensure that the software works, while the full test (a few minutes) will cover a much broader range of settings to ensure everything is correct. From 372e6152421aff3dcc21e0753407b0ddfd980d38 Mon Sep 17 00:00:00 2001 From: gcroci2 Date: Mon, 1 Jul 2024 11:39:09 +0200 Subject: [PATCH 5/5] remove requirements-docker.txt --- .bumpversion.cfg | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index ea591b18..37801fb9 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -15,7 +15,3 @@ replace = version = "{new_version}" [bumpversion:file:CITATION.cff] search = version: "{current_version}" replace = version: "{new_version}" - -[bumpversion:file:env/requirements-docker.txt] -search = deeprank2=={current_version} -replace = deeprank2=={new_version}