mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 23:48:56 +01:00
Add selected OS tab to url in documentation to ease link sharing
This commit is contained in:
parent
87c52dfd02
commit
5dea9ef323
2 changed files with 21 additions and 21 deletions
|
@ -20,7 +20,7 @@ import Tabs from '@theme/Tabs';
|
|||
import TabItem from '@theme/TabItem';
|
||||
```
|
||||
|
||||
<Tabs>
|
||||
<Tabs groupId="operating-systems" queryString="os">
|
||||
<TabItem value="macos" label="MacOS">
|
||||
```shell
|
||||
# Get Khoj Code
|
||||
|
@ -33,7 +33,7 @@ python3 -m venv .venv && source .venv/bin/activate
|
|||
pip install -e '.[dev]'
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="win" label="Windows">
|
||||
<TabItem value="windows" label="Windows">
|
||||
```shell
|
||||
# Get Khoj Code
|
||||
git clone https://github.com/khoj-ai/khoj && cd khoj
|
||||
|
@ -45,7 +45,7 @@ python3 -m venv .venv && .venv\Scripts\activate
|
|||
pip install -e '.[dev]'
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="unix" label="Linux">
|
||||
<TabItem value="linux" label="Linux">
|
||||
```shell
|
||||
# Get Khoj Code
|
||||
git clone https://github.com/khoj-ai/khoj && cd khoj
|
||||
|
@ -63,15 +63,15 @@ pip install -e '.[dev]'
|
|||
|
||||
Khoj uses the `pgvector` package to store embeddings of your index in a Postgres database. To use this, you need to have Postgres installed.
|
||||
|
||||
<Tabs groupId="operating-systems">
|
||||
<Tabs groupId="operating-systems" queryString="os">
|
||||
<TabItem value="macos" label="MacOS">
|
||||
Install [Postgres.app](https://postgresapp.com/). This comes pre-installed with `pgvector` and relevant dependencies.
|
||||
</TabItem>
|
||||
<TabItem value="win" label="Windows">
|
||||
<TabItem value="windows" label="Windows">
|
||||
1. Use the [recommended installer](https://www.postgresql.org/download/windows/).
|
||||
2. Follow instructions to [Install PgVector](https://github.com/pgvector/pgvector#windows) in case you need to manually install it. Windows support is experimental for pgvector currently, so we recommend using Docker. Refer to Windows Installation Notes below if there are errors.
|
||||
</TabItem>
|
||||
<TabItem value="unix" label="Linux">
|
||||
<TabItem value="linux" label="Linux">
|
||||
From [official instructions](https://wiki.postgresql.org/wiki/Apt)
|
||||
</TabItem>
|
||||
<TabItem value="source" label="From Source">
|
||||
|
@ -84,18 +84,18 @@ Install [Postgres.app](https://postgresapp.com/). This comes pre-installed with
|
|||
|
||||
Make sure to update your environment variables to match your Postgres configuration if you're using a different name. The default values should work for most people. When prompted for a password, you can use the default password `postgres`, or configure it to your preference. Make sure to set the environment variable `POSTGRES_PASSWORD` to the same value as the password you set here.
|
||||
|
||||
<Tabs groupId="operating-systems">
|
||||
<Tabs groupId="operating-systems" queryString="os">
|
||||
<TabItem value="macos" label="MacOS">
|
||||
```shell
|
||||
createdb khoj -U postgres --password
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="win" label="Windows">
|
||||
<TabItem value="windows" label="Windows">
|
||||
```shell
|
||||
createdb -U postgres khoj --password
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="unix" label="Linux">
|
||||
<TabItem value="linux" label="Linux">
|
||||
```shell
|
||||
sudo -u postgres createdb khoj --password
|
||||
```
|
||||
|
|
|
@ -48,16 +48,16 @@ Khoj should now be running at http://localhost:42110! You can see the web UI in
|
|||
|
||||
Khoj uses Postgres DB for all server configuration and to scale to multi-user setups. It uses the pgvector package in Postgres to manage your document embeddings. Both Postgres and pgvector need to be installed for Khoj to work.
|
||||
|
||||
<Tabs groupId="operating-systems">
|
||||
<Tabs groupId="operating-systems" queryString="os">
|
||||
<TabItem value="macos" label="MacOS">
|
||||
Install [Postgres.app](https://postgresapp.com/). This comes pre-installed with `pgvector` and relevant dependencies.
|
||||
</TabItem>
|
||||
<TabItem value="win" label="Windows">
|
||||
<TabItem value="windows" label="Windows">
|
||||
For detailed instructions and troubleshooting, see [this section](/contributing/development#2-postgres-installation--setup).
|
||||
1. Use the [recommended installer](https://www.postgresql.org/download/windows/).
|
||||
2. Follow instructions to [Install PgVector](https://github.com/pgvector/pgvector#windows) in case you need to manually install it. Windows support is experimental for pgvector currently, so we recommend using Docker.
|
||||
</TabItem>
|
||||
<TabItem value="unix" label="Linux">
|
||||
<TabItem value="linux" label="Linux">
|
||||
From [official instructions](https://wiki.postgresql.org/wiki/Apt)
|
||||
</TabItem>
|
||||
<TabItem value="source" label="From Source">
|
||||
|
@ -70,18 +70,18 @@ Install [Postgres.app](https://postgresapp.com/). This comes pre-installed with
|
|||
|
||||
Make sure to update your environment variables to match your Postgres configuration if you're using a different name. The default values should work for most people. When prompted for a password, you can use the default password `postgres`, or configure it to your preference. Make sure to set the environment variable `POSTGRES_PASSWORD` to the same value as the password you set here.
|
||||
|
||||
<Tabs groupId="operating-systems">
|
||||
<Tabs groupId="operating-systems" queryString="os">
|
||||
<TabItem value="macos" label="MacOS">
|
||||
```shell
|
||||
createdb khoj -U postgres --password
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="win" label="Windows">
|
||||
<TabItem value="windows" label="Windows">
|
||||
```shell
|
||||
createdb -U postgres khoj --password
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="unix" label="Linux">
|
||||
<TabItem value="linux" label="Linux">
|
||||
```shell
|
||||
sudo -u postgres createdb khoj --password
|
||||
```
|
||||
|
@ -96,7 +96,7 @@ sudo -u postgres createdb khoj --password
|
|||
|
||||
Run the following command in your terminal to install the Khoj server.
|
||||
|
||||
<Tabs groupId="operating-systems">
|
||||
<Tabs groupId="operating-systems" queryString="os">
|
||||
<TabItem value="macos" label="MacOS">
|
||||
```shell
|
||||
# ARM/M1+ Machines
|
||||
|
@ -106,7 +106,7 @@ MAKE_ARGS="-DLLAMA_METAL=on" python -m pip install khoj
|
|||
python -m pip install khoj
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="win" label="Windows">
|
||||
<TabItem value="windows" label="Windows">
|
||||
In PowerShell on Windows
|
||||
```shell
|
||||
# 1. (Optional) To use NVIDIA (CUDA) GPU
|
||||
|
@ -120,7 +120,7 @@ python -m pip install khoj
|
|||
py -m pip install khoj
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="unix" label="Linux">
|
||||
<TabItem value="linux" label="Linux">
|
||||
```shell
|
||||
# CPU
|
||||
python -m pip install khoj
|
||||
|
@ -138,21 +138,21 @@ python -m pip install khoj
|
|||
|
||||
Before getting started, configure the following environment variables in your terminal for the first run
|
||||
|
||||
<Tabs groupId="operating-systems">
|
||||
<Tabs groupId="operating-systems" queryString="os">
|
||||
<TabItem value="macos" label="MacOS">
|
||||
```shell
|
||||
export KHOJ_ADMIN_EMAIL=<your-email>
|
||||
export KHOJ_ADMIN_PASSWORD=<your-password>
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="win" label="Windows">
|
||||
<TabItem value="windows" label="Windows">
|
||||
If you're using PowerShell:
|
||||
```shell
|
||||
$env:KHOJ_ADMIN_EMAIL="<your-email>"
|
||||
$env:KHOJ_ADMIN_PASSWORD="<your-password>"
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="unix" label="Linux">
|
||||
<TabItem value="linux" label="Linux">
|
||||
```shell
|
||||
export KHOJ_ADMIN_EMAIL=<your-email>
|
||||
export KHOJ_ADMIN_PASSWORD=<your-password>
|
||||
|
|
Loading…
Reference in a new issue