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
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.
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 .