Installation¶
Slideflow has been tested and is supported on the following systems:
Ubuntu 18.04
Ubuntu 20.04
Centos 7
Centos 8
Centos 8 Stream
Software Requirements¶
Python 3.7 - 3.10
CPLEX 20.1.0 with Python API [optional] - used for preserved-site cross-validation
QuPath [optional] - used for ROI annotations
Download with pip¶
# Update to latest pip
$ pip install --upgrade pip
# Current stable release
$ pip install slideflow
Run a Docker container¶
The Slideflow docker images have been pre-configured with OpenSlide, Libvips, and either PyTorch 1.11 or Tensorflow 2.8. Using a preconfigured Docker container is the easiest way to get started with compatible dependencies and GPU support.
To install with the Tensorflow 2.8 backend:
$ docker pull jamesdolezal/slideflow:latest-tf
$ docker run -it --gpus all jamesdolezal/slideflow:latest-tf
To install with the PyTorch 1.11 backend:
$ docker pull jamesdolezal/slideflow:latest-torch
$ docker run -it --shm-size=2g --gpus all jamesdolezal/slideflow:latest-torch
Build from source¶
To build Slideflow from source, clone the repository from the project Github page:
$ git clone https://github.com/jamesdolezal/slideflow
$ cd slideflow
$ pip install -r requirements.txt
$ python setup.py bdist_wheel
$ pip install dist/slideflow-1.X.X-py3-any.whl
Warning
A bug in the pixman library (version=0.38) will corrupt downsampled slide images, resulting in large black boxes across the slide. We have provided a patch for version 0.38 that has been tested for Ubuntu, which is provided in the project Github page (pixman_repair.sh), although it may not be suitable for all environments and we make no guarantees regarding its use. The Slideflow docker images already have this applied. If you are installing from source, have pixman version 0.38, and are unable to apply this patch, the use of downsampled image layers must be disabled to avoid corruption (pass enable_downsample=False to tile extraction functions).