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} 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/README.md b/README.md index 4482c0d7..82f101a5 100644 --- a/README.md +++ b/README.md @@ -102,32 +102,24 @@ 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 -# 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 +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 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, 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 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` 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/) @@ -151,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 394a28d0..282d5a26 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 @@ -48,32 +48,24 @@ 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 -# 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 +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 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, 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 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` 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/) @@ -97,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. 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