### Starting Qdrant Docker Instance Manually - Docker Source: https://github.com/otman404/local-rag-llamaindex/blob/master/README.md This command starts a Qdrant vector database instance as a Docker container, mapping port 6333 and mounting a local volume for persistent storage. It provides a standalone Qdrant instance for manual project setup. ```bash docker run -p 6333:6333 -v ~/qdrant_storage:/qdrant/storage:z qdrant/qdrant ``` -------------------------------- ### Starting Ollama LLM Server - Ollama Source: https://github.com/otman404/local-rag-llamaindex/blob/master/README.md This command starts the Ollama LLM server, running the `research_assistant` model. It makes the local language model available for the API server to use for generating answers. ```bash ollama run research_assistant ``` -------------------------------- ### Starting API Server Manually - uv FastAPI Source: https://github.com/otman404/local-rag-llamaindex/blob/master/README.md This command starts the FastAPI server using `uv`, running the `main.py` application in development mode. It makes the RAG API endpoint accessible for receiving queries and returning answers. ```bash uv run fastapi api/main.py dev ``` -------------------------------- ### Setting Up Python Environment Manually - uv Source: https://github.com/otman404/local-rag-llamaindex/blob/master/README.md These commands create a virtual environment using `uv`, activate it, and then install the project's dependencies, including development dependencies. This sets up an isolated Python environment for manual project execution. ```bash uv venv source .venv/bin/activate uv pip install ".[dev]" ``` -------------------------------- ### Running All Services - Docker Compose Source: https://github.com/otman404/local-rag-llamaindex/blob/master/README.md This command starts the specified Docker services: `ollama` (LLM server), `qdrant` (vector database), and `api` (FastAPI backend). It brings up the core components required for the RAG application to function, making them accessible on their respective ports. ```bash docker compose up ollama qdrant api ``` -------------------------------- ### Downloading and Indexing Data Manually - uv Python Source: https://github.com/otman404/local-rag-llamaindex/blob/master/README.md This command executes the `data.py` script using `uv` to download research papers based on a query, limit the results, and ingest them into the Qdrant database. It performs the data ingestion step for the manual setup. ```bash uv run data/data.py --query "LLM" --max 5 --ingest ``` -------------------------------- ### Cloning the Repository - Git Source: https://github.com/otman404/local-rag-llamaindex/blob/master/README.md This command clones the `local-rag-llamaindex` repository from GitHub to your local machine and then changes the current directory into the newly cloned repository, preparing for further setup. ```bash git clone https://github.com/Otman404/local-rag-llamaindex cd local-rag-llamaindex ``` -------------------------------- ### Downloading and Ingesting Papers - Docker Compose Source: https://github.com/otman404/local-rag-llamaindex/blob/master/README.md This command runs the `data_ingestion` service as a one-off container to download research papers from Arxiv based on a query, limit the results, and ingest them into the Qdrant database. It prepares the vector database with relevant document chunks for querying. ```bash docker compose run data_ingestion --query "LLM" --max 5 --ingest ``` -------------------------------- ### Building Docker Images - Docker Compose Source: https://github.com/otman404/local-rag-llamaindex/blob/master/README.md This command builds the Docker images defined in the `docker-compose.yml` file. It creates a base image for shared dependencies, an API service image, and a data ingestion service image, essential for running the RAG application. ```bash docker compose build ``` -------------------------------- ### Creating Ollama Model from Modelfile - Ollama Source: https://github.com/otman404/local-rag-llamaindex/blob/master/README.md This command uses Ollama to create a custom language model named `research_assistant` from a specified `Modelfile`. This step is necessary to define and prepare the LLM for local use within the RAG application. ```bash ollama create research_assistant -f ollama/Modelfile ``` -------------------------------- ### Stopping and Cleaning Up Services - Docker Compose Source: https://github.com/otman404/local-rag-llamaindex/blob/master/README.md This command stops and removes all containers, networks, and volumes created by `docker compose up`. It's used to clean up the Docker environment and free up resources after using the application. ```bash docker compose down ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.