Skip to main content
Version: Latest

Installation

Tutorial video

Requirements

We recommend using a conda environment manager.

System requirements:

  • Python>=3.8
  • CUDA (run nvidia-smi command and ensure it shows your available GPUs)

Optional requirements

Graph visualization

If you wish to visualize the model architecture graph before and after the compression process you can install the dependencies graphviz and pydot using:

conda install graphviz
pip install pydot

Once the dependencies are installed, two .svg files containing the visualizations of the original model and the quantized model will be generated in the outputs folder when running CLIKA Compression Operation (CCO). For more information, see graph visualization.

Monitoring integration

If you wish to monitor your training using TensorBoard you must install tensorboard package using the following line:

pip install tensorboard

For more information, see Monitoring Integration on the CLIKA usage instructions page.

CLIKA Compression Installation

Installing clika-compression is like installing any other Python package using the pip package manager; the only special requirement is to add the license key to gain access to CLIKA's PIP index.

You can install the package using the following lines:

# set your license key as a environment varialbe
export CC_LICENSE_KEY=YOUR_LICENSE_KEY
pip install --force "clika-compression" --extra-index-url \
https://license:$CC_LICENSE_KEY@license.clika.io/simple

Making the license key globally available

Since every usage of the clika-compression package requires the availability of a valid license key, we will provide clika-compression access to the license key within your system.

Execute the following command from any directory:

clika-init-license

and insert your license key when prompted.

This process will generate a file containing your license key in ~/.clika/.cc_license, which can be accessed by the clika-compression package, facilitating its usage whenever required.

Congratulations! you can now start using the clika-compression python package.


note

(Optional) An alternative option to keep your license key globally available is to set it as a permanent environment variable instead if using the clika-init-license command

tip

If you wish to add clika-compression to a requirements.txt file, you may add the following lines:

--extra-index-url https://license:$CC_LICENSE_KEY@license.clika.io/simple
clika-compression

Common issues

In the case of CUDA related issues we recommend to perform the following steps.

Verify CUDA installation

Validate CUDA installation using:

nvcc --version

Expected output:

  • Installed CUDA version printed out on your screen. (latest CUDA version is better)

If the command does not work as expected please refer to the CUDA installation guide.

Verify PyTorch installation

Test if the GPU is accessible to PyTorch using:

python3 -c "import torch; print(torch.cuda.is_available())"

Expected output:

>>> True

If the output is False please refer to the PyTorch installation guide.