| feature_image | ../assets/images/banner/banner_back.jpg | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| carousels |
|
🔥NEWS🔥: BiaPy's paper is finally out in Nature Methods!
[Preprint in bioRxiv]
{% tabs installation %}
{% tab installation GUI %}
Please install Docker to use the GUI following these instructions.
Find instructions on how to use the GUI in this video.
You can also install previous versions of BiaPy's graphical user interface.
{% tab installation Colab Notebooks %}
{% include notebook-carousel.html %}
{% endtab %}
{% tab installation Galaxy %}
BiaPy is available as a tool in the Galaxy platform, enabling users to run biomedical image analysis workflows through an intuitive, web-based interface without requiring any local installation. The tool can be accessed directly from the Galaxy ToolShed at this link, and it can also be found by searching for "biapy" in the Galaxy ToolShed interface here.
{% endtab %}
{% tab installation Docker %}
We have a container prepared to run BiaPy:| Pytorch | 2.12.1 |
| CUDA | 11.8 |
| Ubuntu | 22.04 |
Docker Engine is available for Windows, macOS, and Linux, through Docker Desktop. For instructions on how to install Docker Desktop, see:
{% endtab %}
{% tab installation API %}
If you want to use BiaPy as a library in your own Python scripts, you can install it via pip:
pip install biapyor via conda/mamba:
conda install -c conda-forge biapypip install biapy and conda install -c conda-forge biapy already pull in a compatible CPU build of PyTorch as part of dependency resolution. If you have an NVIDIA GPU, replace it with a matching CUDA build afterwards: check the torch/torchvision versions pinned in BiaPy's pyproject.toml (as of BiaPy 3.6.8: torch==2.12.1 / torchvision==0.27.1) and reinstall that exact pair through the official PyTorch selector for your CUDA version, for example:
pip install torch==2.12.1 torchvision==0.27.1 --index-url https://download.pytorch.org/whl/cu126pip install torch torchvision). It installs the newest release, which is often outside the range BiaPy expects and can break the install or raise a ResolutionImpossible error.After that you can import BiaPy in your Python scripts:
import biapyYou can find more information in the following sections:
- Library examples that show how to use BiaPy as a library in your own Python scripts.
- API documentation for more information on how to use BiaPy as a library in your own Python scripts.
{% endtab %}
{% tab installation Command line %}
You have three different options to install BiaPy. Choose one or another depending on your preferences:
{% tabs command_line_installation %}
{% tab command_line_installation Option 1: Conda %}
To use BiaPy via the command line, you will need to set up a conda environment. To do this, you will first need to install Conda. Then choose one of the following options based on your machine capabilities:
A. GPU-capable machine (NVIDIA GPU)
conda config --set channel_priority strict
conda create -n BiaPy_env -c conda-forge python=3.11 biapy pytorch-gpu
conda activate BiaPy_envVerify GPU at runtime:
python -c 'import torch; print(torch.__version__)'
>>> 2.12.1
python -c 'import torch; print(torch.cuda.is_available())'
>>> TrueB. CPU-only machine
conda config --set channel_priority strict
conda create -n BiaPy_env -c conda-forge python=3.11 biapy
conda activate BiaPy_env{% endtab %}
{% tab command_line_installation Option 2: Mamba %}
Before you begin, ensure you have Mamba installed. Mamba is a faster alternative to Conda and can be used to manage your conda environments.Once you have mamba installed you will to choose one of the following options based on your machine capabilities:
A. GPU-capable machine (NVIDIA GPU)
mamba create -n BiaPy_env -c conda-forge python=3.11 biapy pytorch-gpu
mamba activate BiaPy_envVerify GPU at runtime:
python -c 'import torch; print(torch.__version__)'
>>> 2.12.1
python -c 'import torch; print(torch.cuda.is_available())'
>>> TrueB. CPU-only machine
mamba create -n BiaPy_env -c conda-forge python=3.11 biapy
mamba activate BiaPy_env{% endtab %}
{% tab command_line_installation Option 3: Developer %}
Set up a conda/mamba environment:
mamba create -n BiaPy_env -c conda-forge python=3.11
mamba activate BiaPy_envClone BiaPy repository:
git clone https://github.com/BiaPyX/BiaPy.git
cd BiaPypip install torch torchvision before pip install -e .. That installs whatever is newest, which will often fall outside the exact torch/torchvision range pinned in pyproject.toml and makes pip fail with a ResolutionImpossible error — or, on machines with an older NVIDIA driver, silently install a PyTorch build compiled for a newer CUDA version than your driver supports, which will make torch.cuda.is_available() return False at runtime. Install a matching pinned pair first instead, then let pip install -e . reuse it.Check pyproject.toml for the exact supported torch/torchvision versions (as of BiaPy 3.6.8: torch>=2.12,<2.13 / torchvision>=0.27,<0.28, i.e. the 2.12.1 / 0.27.1 pair). Install that exact pair, choosing GPU or CPU. Use the official PyTorch selector to find the right --index-url for your CUDA version (the selector always proposes the latest torch release, so replace the version-less command it gives you with the pinned versions below). Check nvidia-smi first: the "CUDA Version" it reports is the newest CUDA build your driver can run, so pick an index whose CUDA version does not exceed it, for example:
# GPU (CUDA 12.6, for example)
pip install torch==2.12.1 torchvision==0.27.1 --index-url https://download.pytorch.org/whl/cu126
# CPU only
pip install torch==2.12.1 torchvision==0.27.1 --index-url https://download.pytorch.org/whl/cpuInstall BiaPy in editable mode:
pip install -e .{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}
-
Find BiaPy step-by-step guides, video tutorials and more on ReadTheDocs
-
Join other BiaPy users and search discussions on image.sc
-
Check out BiaPy's source code on GitHub
-
Check out usage tips and documented errors in our FAQ & Troubleshooting section
