3. Getting started

3.1. Installation

Please download or clone the Neuro-inspired AI Toolkit Github repository into neuroaikit directory by running:

git clone https://github.com/IBM/neuroaikit.git

Next sections describe how to:

  • (optional) setup the environment - you can use either A) Python3 venv or B) Conda installation, but we focus our support on Python3 venv

  • (optional) add this environment to Jupyter Notebooks

  • install the Neuro-inspired AI Toolkit package in your environment

Note: Creating a dedicated enviroment is optional, i.e. it is possible to directly proceed with package installation that would be then installed system-wide. However, creating separate environments for different projects is a recommended programming practice to avoid conflicts between the dependencies and to automate their installation.

3.1.1. Preparation - Option A: Python3 venv

Open the command line prompt at that directory and create a Python virtual enviroment in venv directory:

neuroaikit$ python3 -m venv venv

Activate the virtual environment with (Windows):

neuroaikit$ .\venv\Scripts\activate

or (Unix-like):

neuroaikit$ source ./venv/bin/activate

Install required packages into the virtual environment:

(venv) neuroaikit$ pip install -r requirements.txt

3.1.2. Preparation - Option B: Conda

Note: Support for Conda is experimental. Possible approaches: uncomment relevant requirements in requirements.txt, then run:

conda create -n neuroaikit_conda --file requirements.txt
conda activate neuroaikit_conda

or install manually:

conda create -n neuroaikit_conda tensorflow-gpu=2.4 numpy=1.19
conda activate neuroaikit_conda
pip install -r requirements.txt

3.1.3. Jupyter setup

Examples are based on Jypyter notebooks. Having Jupter installed pip install jupyter, you also need to add the toolkit kernel into it. From the venv please run the following commands:

(venv) neuroaikit$ pip install ipykernel
(venv) neuroaikit$ python -m ipykernel install --user --name neuroaikit_venv --display-name "neuroaikit venv"

This enables to choose “neuroaikit venv” as the kernel when you open the Jupyter notebooks.

3.1.4. Toolkit installation

(venv) neuroaikit$ cd ..
(venv) $ pip install --editable neuroaikit

3.1.5. Toolkit removal

(venv) $ pip uninstall neuroaikit

3.2. Running examples

Please start Jupyter

(venv) neuroaikit$ jupyter notebook

and navigate to Website\Examples directory.