Miniforge Setup for the Generative Models Extension for Altair AI Studio
- Open Windows Control Panel and check for any existing Python installations or distributions such as Anaconda or Miniforge/Miniconda. Uninstall all of them.
- 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.
- 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
- 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.
- 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
- 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
- Check the prerequisite extensions and install or upgrade them in your Altair AI Studio if required.
- Download the appropriate Environment Configuration File (*.yml) for your CUDA version.
- Download the Additional Package Configuration *.txt file for your OS and CUDA version.
- Save both files (yml and txt) in any folder, for example, C:\Work\RapidMiner\Gen-AI-Extension
- Update conda:
conda update -n base -c conda-forge conda
- Check your Python version:
python --version
Note that the subsequent commands will update it to version 3.11.5 required by the extension.
- 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
- 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:
- 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
- Move the file huggingface_hub-0.18.0rc0-py3.8.egg out from this folder to a backup location.
- 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
- 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
- Open Altair AI Studio. From the Extensions menu, select Marketplace (Updates and Extensions), search for “Generative” (see the screenshot below):
- Select all applicable extensions (in this case, Generative AI and Generative Models) and install them. Restart Altair AI Studio.