Miniforge Setup for the Generative Models Extension for Altair AI Studio


Miniforge Setup for the Generative Models Extension for Altair AI Studio

  1. Open Windows Control Panel and check for any existing Python installations or distributions such as Anaconda or Miniforge/Miniconda. Uninstall all of them.

 

  1. Open your Environment Variables and check both User and System Variables sections for anything Python-related (variables like PYTHONPATH, PYTHON_HOME or anything in PATH). Delete these and cleanup the folders they point to, provided that you cleanly uninstalled the packages those folders belong to.

 

  1. Download Miniforge3 from https://github.com/conda-forge/miniforge. The latest installers with the latest Python in the base environment are here:

https://github.com/conda-forge/miniforge?tab=readme-ov-file#download

  1. From the Windows Start menu, select Miniforge3 and run Miniforge Prompt as Administrator: 

 

All commands given below should be executed in the Miniforge Prompt run as Administrator.

 

  1. Delete any already existing rm_genai environment (Note: this is not really needed if you had cleanly uninstalled all Python stuff):

conda remove --name rm_genai --all

A screenshot of a computerDescription automatically generated

  1. Check the CUDA Version on your computer:

nvidia-smi

Go to the Generative AI Extension setup documentation at https://docs.rapidminer.com/2024.0/studio/generative-ai/index.html#installation-and-setup

  1. Check the prerequisite extensions and install or upgrade them in your Altair AI Studio if required.

 

 

  1. Download the appropriate Environment Configuration File (*.yml) for your CUDA version.
  2. Download the Additional Package Configuration *.txt file for your OS and CUDA version.
  3. Save both files (yml and txt) in any folder, for example, C:\Work\RapidMiner\Gen-AI-Extension

 

  1. Update conda:

conda update -n base -c conda-forge conda

  1. Check your Python version:

python --version

Note that the subsequent commands will update it to version 3.11.5 required by the extension.

 

  1. Run the commands in Step 4: Creating Conda Environment of the Gen AI Extension setup. For example, if your CUDA version is 12.1 or higher:

cd <path_to_the_folder_with_yml/txt_files>

conda env create -f rm_genai_conda_windows_gpu_cuda_12_1.yml

A computer screen shot of a black screenDescription automatically generated

  1. Activate the rm_genai environment for conda:

conda activate rm_genai

The new environment name (rm_genai) will be shown at the beginning of your command line:

A black screen with white textDescription automatically generated

  1. Open the Python packages folder of your rm_genai environment of your Miniforge. For example, on Windows, this would be C:\ProgramData\miniforge3\envs\rm_genai\lib\site-packages

 

  1. Move the file huggingface_hub-0.18.0rc0-py3.8.egg out from this folder to a backup location.

 

  1. Run this pip install command to install additional packages using the downloaded txt file:

pip install -r <rm_genai_requirements_txt_file>

At the end of the output, you will see the following messages:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.

datasets 2.15.0 requires dill<0.3.8,>=0.3.0, but you have dill 0.3.8 which is incompatible.

datasets 2.15.0 requires fsspec[http]<=2023.10.0,>=2023.1.0, but you have fsspec 2024.6.1 which is incompatible.

Successfully installed argon2-cffi-23.1.0 argon2-cffi-bindings-21.2.0 coloredlogs-15.0.1 environs-9.5.0 fastembed-0.1.3 flatbuffers-24.3.25 grpcio-1.58.0 grpcio-tools-1.58.0 huggingface-hub-0.19.4 humanfriendly-10.0 marshmallow-3.21.3 minio-7.2.7 onnx-1.16.2 onnxruntime-1.18.1 pycryptodome-3.20.0 pymilvus-2.3.5 pyreadline3-3.4.1 python-dotenv-1.0.1 qdrant-client-1.7.0 tokenizers-0.15.2 ujson-5.10.0 urllib3-1.26.19

A screen shot of a computer programDescription automatically generated

 

  1. In accordance with the error messages, downgrade the dill and fsspec packages to the maximum compatible versions (in this case, 0.3.7 and 2023.10.0, respectively):

 

conda install dill=0.3.7

 

conda install fsspec=2023.10.0

 

 

 

 

  1. Open Altair AI Studio. From the Extensions menu, select Marketplace (Updates and Extensions), search for “Generative” (see the screenshot below):

 

 

  1. Select all applicable extensions (in this case, Generative AI and Generative Models) and install them. Restart Altair AI Studio.