Install¶
This page covers environment setup only. For usage, go to Quick Start or the Workflow section.
Requirements¶
- Python 3.12
- CUDA 12 or newer for GPU-backed training and inference
nvccavailable when compiling therspmmkernel- Poetry if you plan to install from source or contribute to the repository
Install With Conda¶
Bash
conda create -n gfmrag python=3.12
conda activate gfmrag
conda install cuda-toolkit -c nvidia/label/cuda-12.6.3
pip install gfmrag
Install With Pip¶
Install From Source¶
Bash
git clone https://github.com/RManLuo/gfm-rag.git
cd gfm-rag
conda create -n gfmrag python=3.12
conda activate gfmrag
conda install cuda-toolkit -c nvidia/label/cuda-12.6.3
poetry install
Optional LLM Backends¶
Llama.cpp¶
References:
- https://python.langchain.com/docs/integrations/chat/llamacpp/
- https://github.com/abetlen/llama-cpp-python
Ollama¶
Reference:
Troubleshooting¶
CUDA errors when compiling rspmm¶
If compilation fails, make sure nvcc is available and CUDA_HOME points to the installed toolkit:
If CUDA was installed via conda, CUDA_HOME is often configured automatically.
rspmm compilation appears stuck¶
Clear the extension cache and retry:
Need development commands instead of installation¶
See Development for mkdocs, pre-commit, and packaging commands.