Skip to main content
Version: 0.1

Installation

Tutorial Video

Requirements

We recommend using a conda environment manager.

System Requirements:

Validate CUDA 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 CUDA installation guide and make sure that the GPU is accessible by PyTorch before continuing to the next steps.

Optional Requirements

If you wish to get visualization of the model architecture graph before and after the compression process you may install graphviz and pydot using:

conda install graphviz 
pip install pydot

Once those are installed two .png files will be automatically generated in the outputs folder after every CLIKA Compression Operation (CCO) run.

The files are:

  • model_init.png - Architecture of the model before compression
  • model_post_preprocessing.png - Architecture of the model after compression

CLIKA Compression Installation

Installing clika-compression is like installing any other Python package using 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:

export CC_LICENSE_KEY=<your-license-key> 
pip install --force "clika-compression" --extra-index-url \
https://license:$CC_LICENSE_KEY@license.clika.io/simple

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

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

Keep License Key Available Globally

Since every usage of the clika-compression package requires the availability of a valid license key, after the initial installation, be sure to provide clika-compression access to the license key within your system.

These are the two ways in which the license key can be stored within your system:

  1. Storing the license key in a local file (recommended):

    • After installing clika-compression, execute the command: clika-init-license from any directory.
    • 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.
  2. Setting the license key as permanent environment variable:

    • Open the ~/.bashrc file.
    • Append the following line at the end of the file: export CC_LICENSE_KEY=<your-license-key>

By following either one of these methods, you can ensure that clika-compression package has constant access to your license key, facilitating its usage whenever required.