quivr/docs/install.mdx

92 lines
3.0 KiB
Plaintext
Raw Normal View History

---
title: Quickstart
description: Get your own assistant in less than 5 seconds
icon: bolt
---
2024-02-08 00:57:44 +03:00
2023-12-29 13:01:02 +03:00
## Getting Started 🚀
2023-12-29 13:01:02 +03:00
Follow these instructions to get a copy of the project up and running on your local machine for development and testing purposes.
2023-12-29 13:01:02 +03:00
You can find everything on the [documentation](https://docs.quivr.app/).
2023-12-29 13:01:02 +03:00
### Prerequisites 📋
2023-12-29 13:01:02 +03:00
Ensure you have the following installed:
2023-12-29 13:01:02 +03:00
- Docker
- Docker Compose
2023-12-29 13:01:02 +03:00
### 60 seconds Installation 💽
2023-12-29 13:01:02 +03:00
You can find the installation video [here](https://www.youtube.com/watch?v=cXBa6dZJN48).
2023-12-29 13:01:02 +03:00
- **Step 1**: Clone the repository:
2023-12-29 13:01:02 +03:00
```bash
2024-02-08 00:59:48 +03:00
git clone https://github.com/quivrhq/quivr.git && cd Quivr
```
2023-12-29 13:01:02 +03:00
- **Step 2**: Copy the `.env.example` files
2023-12-29 13:01:02 +03:00
```bash
cp .env.example .env
```
2023-12-29 13:01:02 +03:00
- **Step 3**: Update the `.env` files
2023-12-29 13:01:02 +03:00
```bash
vim .env # or emacs or vscode or nano
```
2023-12-29 13:01:02 +03:00
Update **OPENAI_API_KEY** in the `.env` file.
2023-12-29 13:01:02 +03:00
You just need to update the `OPENAI_API_KEY` variable in the `.env` file. You can get your API key [here](https://platform.openai.com/api-keys). You need to create an account first. And put your credit card information. Don't worry, you won't be charged unless you use the API. You can find more information about the pricing [here](https://openai.com/pricing/).
2023-12-29 13:01:02 +03:00
> Want to use [Ollama.ai](https://ollama.ai) instead?
> Uncomment the following lines in the `.env` file:
> OLLAMA_API_BASE_URL
> Run the following command to start Ollama: `ollama run llama2`
> You can find more information about Ollama [here](https://ollama.ai/).
2023-12-29 13:01:02 +03:00
- **Step 4**: Launch the project
2023-12-29 13:01:02 +03:00
```bash
docker compose pull
docker compose up --build # if OPENAI
# docker compose -f docker-compose-ollama.yml up --build # Only if using Ollama. You need to run `ollama run llama2` first.
```
2023-12-29 13:01:02 +03:00
If you have a Mac, go to Docker Desktop > Settings > General and check that the "file sharing implementation" is set to `VirtioFS`.
2023-12-29 13:01:02 +03:00
If you are a developer, you can run the project in development mode with the following command: `docker compose -f docker-compose.dev.yml up --build`
2023-12-29 13:01:02 +03:00
- **Step 5**: Login to the app
2023-12-29 13:01:02 +03:00
Connect to the supabase database at [http://localhost:8000/project/default/auth/users](http://localhost:8000/project/default/auth/users) with the following credentials: admin/admin in order to create new users. Auto-confirm the email.
2023-12-29 13:01:02 +03:00
You can now sign in to the app with your new user. You can access the app at [http://localhost:3000/login](http://localhost:3000/login).
2023-12-29 13:01:02 +03:00
You can access Quivr backend API at [http://localhost:5050/docs](http://localhost:5050/docs)
2023-12-29 13:01:02 +03:00
## Updating Quivr 🚀
2023-12-29 13:01:02 +03:00
- **Step 1**: Pull the latest changes
2023-12-29 13:01:02 +03:00
```bash
git pull
```
2023-12-29 13:01:02 +03:00
- **Step 2**: Use the `migration.sh` script to run the migration scripts
2023-12-29 13:01:02 +03:00
```bash
chmod +x migration.sh # You need to install Gum & postgresql (brew install gum for example)
./migration.sh
# Select 2) Run migrations
```
2023-12-29 13:01:02 +03:00
Alternatively, you can run the script on the Supabase database via the web
interface (SQL Editor -> `New query` -> paste the script -> `Run`)
2024-02-08 00:57:44 +03:00
All the scripts can be found in the `scripts/` folder