First, we need to install my fork of HistoReg that contains a ready-to-use Dockerfile.
cd
git clone https://github.com/schwobr/HistoReg.git
docker build -t historeg HistoReg
We then need to create a conda environment with pytorch.
conda create -n apriorics python=3.9
conda activate apriorics
conda install pytorch torchvision cudatoolkit=11.3 -c pytorch
conda install openslide -c conda-forge
NB: To check required cudatoolkit
version, type nvcc --version
in a shell. Cuda is always compatible with older versions of the same major release (for instance if your nvcc version is 11.5, you can install cudatoolkit=11.3
here). Specific versions of pytorch
are only available with few cudatoolkit
versions, you can check it on PyTorch official website.
Make sure that you have blas and lapack installed:
sudo apt install libblas-dev libblapack-dev # debian-based systems
sudo yum install blas-devel lapack-devel # CentOS 7
sudo dnf install blas-devel lapack-devel # CentOS 8
We can then clone this repository and install necessary pip packages.
cd
git clone https://github.com/schwobr/apriorics.git
cd apriorics
pip install -r requirements.txt
You can also install this library as an editable pip package, which will install all dependencies automatically.
pip install -e .