Installation#
Quick install
In Python3.9 environment, in a virtualenv:
pip install -U pip wheel
pip install "dnikit[complete]"
The preceding command will install the main DNIKit package, TensorFlow2 and PyTorch compatibility, and requirements to run the notebook examples.
Note: For dev installation or to install from a specific branch, refer to the Contributor’s Guide.
Python Support#
DNIKit currently supports Python version 3.7 or greater for macOS or Linux. Python 3.9 is recommended. Note: to run TensorFlow 1, install Python 3.7.
To install Python version 3.9 (recommended):
MacOS: The Python installer package can be downloaded from the Python.org website. During installation, deselecting GUI applications, UNIX command-line tools, and Python documentation will reduce the size of what is installed.
Ubuntu:
sudo apt install -y python3.9-dev python3.9-venv python3.9-tk
sudo apt-get install -y libsm6 libxext6 libxrender-dev libgl1-mesa-glx
Virtualenv Creation#
It’s recommended to use a virtual environment to manage all dependencies:
python3.9 -m venv .venv39
source .venv37/bin/activate
And update pip and wheel:
pip install --upgrade pip wheel
Installation with pip#
The base DNIKit is installed with pip as follows:
pip install dnikit
DNIKit has additional installation options, which are installed in square brackets, using quotes:
pip install "dnikit[dataset-report,tensorflow,...]"
Here are the options currently available:
Module |
Description |
---|---|
dnikit |
Always installed, base DNIKit, with Familiarity, PFA, INA, and DimensionReduction. |
-> [notebook] |
Installs dependencies to run and visualize the jupyter notebook tutorials, including jupyter, matplotlib, pandas, … |
-> [image] |
Installs opencv (headless) and Pillow to enable image processing capabilities. |
-> [dimreduction] |
Installs umap_learn and pacmap for dimensionality reduction. |
-> [dataset-report] |
Installs all requirements to run the Dataset Report. |
-> [tensorflow] |
Installs dnikit_tensorflow and TF2 to load & run TF models within DNIKit. |
-> [tensorflow1] |
Installs dnikit_tensorflow and TF1 to load & run TF models within DNIKit. Must have Python <=3.7 due to TF 1. |
-> [tensorflow1-gpu] |
Same as preceding row, but with TensorFlow GPU. Must have Python <=3.7 due to TF 1 constraints. |
-> [torch] |
Installs |
-> [complete] |
Installs |
Running the Jupyter Notebooks Examples#
First, install the notebook dependencies:
pip install "dnikit[notebook]"
Next, download the DNIKit notebooks directly or use them via cloning the dnikit repository.
Finally, launch jupyter to open the notebooks:
jupyter notebook
Installation for developers#
Check out the Development Installation page to install DNIKit for development.
Issues with installation?#
Please file an issue in the GitHub repository.