File size: 3,152 Bytes
59ce7b1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
# Installation Guide
This guide covers installing DeepBoner for development or local use.
## Prerequisites
### Required
- **Python 3.11+** - Required for type hints and async features
- **uv** - Fast Python package manager ([install guide](https://github.com/astral-sh/uv))
- **Git** - For version control
### Optional
- **Docker** - For containerized deployment
- **OpenAI API key** - For premium features (GPT-5)
- **NCBI API key** - For higher PubMed rate limits
## Quick Install
```bash
# Clone the repository
git clone https://github.com/The-Obstacle-Is-The-Way/DeepBoner.git
cd DeepBoner
# Install all dependencies (including dev tools)
make install
```
This runs `uv sync --all-extras && uv run pre-commit install` behind the scenes.
## Manual Installation
If you prefer not to use `make`:
```bash
# Install uv if not already installed
pip install uv
# Sync all dependencies
uv sync --all-extras
# Install pre-commit hooks
uv run pre-commit install
```
## Optional Dependencies
DeepBoner has optional dependency groups for specific features:
```bash
# Core only (no dev tools)
uv sync
# With development tools
uv sync --extra dev
# With Microsoft Agent Framework (Magentic)
uv sync --extra magentic
# With LlamaIndex RAG support
uv sync --extra rag
# Everything
uv sync --all-extras
```
## Environment Configuration
1. Copy the example environment file:
```bash
cp .env.example .env
```
2. Edit `.env` with your settings:
```bash
# Required for premium features
OPENAI_API_KEY=sk-your-key-here
# Optional: Higher PubMed rate limits
NCBI_API_KEY=your-ncbi-key-here
# Optional: HuggingFace token for gated models
HF_TOKEN=hf_your-token-here
```
See [Configuration Guide](configuration.md) for all options.
## Verify Installation
Run the quality checks to verify everything works:
```bash
make check
```
This runs:
- Linting (ruff)
- Type checking (mypy)
- Unit tests (pytest)
All checks should pass before you start development.
## Running the Application
Start the Gradio UI:
```bash
uv run python src/app.py
```
Open http://localhost:7860 in your browser.
## Docker Installation
For containerized deployment:
```bash
# Build the image
docker build -t deepboner .
# Run the container
docker run -p 7860:7860 --env-file .env deepboner
```
See [Docker Deployment](../deployment/docker.md) for details.
## Troubleshooting
### Common Issues
**uv not found**
```bash
pip install uv
# or
curl -LsSf https://astral.sh/uv/install.sh | sh
```
**Python version mismatch**
```bash
# Check your Python version
python --version
# Should be 3.11 or higher
# Use pyenv to manage versions if needed
```
**Pre-commit hook failures**
```bash
# Run formatting to fix most issues
make format
```
**Import errors after install**
```bash
# Ensure you're using uv run
uv run python -c "import src.app"
```
See [Troubleshooting](troubleshooting.md) for more solutions.
## Next Steps
- [Quickstart Guide](quickstart.md) - Run your first query
- [Configuration Guide](configuration.md) - Configure all options
- [Architecture Overview](../architecture/overview.md) - Understand the system
|