DNNF can be installed using pip, manually from source, or using docker. We also provide a pre-configured VirtualBox VM, containing the tool and data used for the evaluation in Reducing DNN Properties to Enable Falsification with Adversarial Attacks (pre-print).
DNNF can be installed using pip by running:
$ pip install dnnf
This will install the latest release of DNNF on PyPI. To install the most recent changes from GitHub, run:
$ pip install git+https://github.com/dlshriver/DNNF.git@main
Installation with pip will not install the TensorFuzz falsification backend. Currently this backend is only available through manual installation or the provided docker image.
The required dependencies to install DNNF from source are:
The optional tensorfuzz backend also requires:
If you do not plan to use tensorfuzz, then these dependencies are not required. Please ensure that the required dependencies are installed prior to running the installation script. For example, on a fresh Ubuntu 20.04 system, the dependencies can be installed using apt as follows:
$ sudo add-apt-repository ppa:deadsnakes/ppa $ sudo apt-get update $ sudo apt-get install git python2.7 python3.7 virtualenv
To install DNNF in the local directory, download this repo and run the provided installation script, optionally specifying which backends to include during installation:
$ ./install.sh [--include-cleverhans] [--include-foolbox] [--include-tensorfuzz]
We have successfully tested this installation procedure on machines running Ubuntu 20.04 and CentOS 7.
We also provide a pre-built docker image containing DNNF, available on Docker Hub. To use this image, run the following:
$ docker pull dlshriver/dnnf $ docker run --rm -it dlshriver/dnnf (.venv) dnnf@hostname:~$ dnnf -h
To build a docker image with the latest changes to DNNF, run:
$ docker build . -t dlshriver/dnnf $ docker run --rm -it dlshriver/dnnf (.venv) dnnf@hostname:~$ dnnf -h