This guide explains how to set up and run the SmartDoc AI Q&A Assistant on a target machine with no internet access, using Docker.
SmartDoc is an offline, PDF-based Q&A system that uses local large language models (LLMs) like llama3, phi3, etc., and local embeddings. All processing is done on your machine—no internet, no external APIs.
-
Docker Desktop must be installed and running.
Download: https://www.docker.com/products/docker-desktop -
This entire project directory must be copied from a source machine, including:
.ollamadirectory containing modelslocal_models/with rerankerdemo-rag-chroma/(optional; will be auto-generated)
Ensure the folder structure looks like this:
SmartDoc/
├── app.py
├── requirements.txt
├── Dockerfile
├── docker-compose.yml
│
├── .ollama/ # Contains pre-downloaded LLMs
│ └── models/
│ ├── blobs/
│ └── manifests/
│
├── demo-rag-chroma/ # Vector store (auto-generated if missing)
│
├── local_models/
│ └── ms-marco-MiniLM-L-6-v2/
│ ├── config.json
│ ├── pytorch_model.bin
│ ├── special_tokens_map.json
│ ├── tokenizer_config.json
│ └── vocab.txt
Do not rename or delete .ollama or local_models.
Open a terminal inside the SmartDoc directory and run:
docker compose builddocker compose upWait until you see a message similar to:
smartdoc-1 | URL: http://0.0.0.0:8501
Open your browser and go to:
http://localhost:8501
- Upload a PDF document using the interface
- Choose an LLM from the dropdown menu (e.g., LLaMA3, Phi3, etc.)
- Type in your question related to the document
- Receive a contextual and accurate response
- All models are run locally via Ollama
- Embeddings are generated with local embedding models
- No API keys or internet connection are required
- Once set up, it works fully offline
- The first launch may take a few moments as services initialize
- If anything breaks, try restarting Docker or running
docker compose downthendocker compose upagain