Add Instruction to Install, Run Khoj via Pip to Readme #Development

This commit is contained in:
Debanjum Singh Solanky 2022-08-02 21:12:27 +03:00
parent 1b55462fb0
commit d57bd41019
2 changed files with 41 additions and 4 deletions

View file

@ -12,9 +12,9 @@
- [Analysis](#Analysis)
- [Architecture](#Architecture)
- [Setup](#Setup)
- [Clone](#Clone)
- [Configure](#Configure)
- [Run](#Run)
- [Clone](#1.-Clone)
- [Configure](#2.-Configure)
- [Run](#3.-Run)
- [Use](#Use)
- [Upgrade](#Upgrade)
- [Troubleshoot](#Troubleshoot)
@ -117,6 +117,35 @@ docker-compose build --pull
### Setup on Local Machine
#### Using Pip
1. Install Dependencies
1. Python3, Pip \[Required\]
2. Virualenv \[Optional\]
3. Install Exiftool \[Optional\]
``` shell
sudo apt-get -y install libimage-exiftool-perl
```
2. Install Khoj
``` shell
git clone https://github.com/debanjum/khoj && cd khoj
virtualenv -m python3 .venv && source .venv/bin/activate
pip install .
```
3. Configure
- Configure files/directories to search in `content-type` section of `sample_config.yml`
- To run application on test data, update file paths containing `/data/` to `tests/data/` in `sample_config.yml`
- Example replace `/data/notes/*.org` with `tests/data/notes/*.org`
4. Run
Load ML model, generate embeddings and expose API to query notes, images, transactions etc specified in config YAML
``` shell
khoj -c=config/sample_config.yml -vv
```
#### Using Conda
1. Install Dependencies
1. Install Python3 \[Required\]
2. [Install Conda](https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html) \[Required\]
@ -145,7 +174,14 @@ docker-compose build --pull
```
### Upgrade On Local Machine
#### Using Pip
``` shell
cd khoj
git pull origin master
pip install --upgrade .
```
#### Using Conda
``` shell
cd khoj
git pull origin master

View file

@ -6,7 +6,7 @@ setup(
name='khoj',
version='1.0',
description="A natural language search engine for your personal notes, transactions and images",
long_description=open('README.md', "r", encoding="utf-8").read(),
long_description=open('Readme.md', "r", encoding="utf-8").read(),
long_description_content_type="text/markdown",
author='Debanjum Singh Solanky, Saba Imran',
author_email='debanjum@gmail.com',
@ -48,5 +48,6 @@ setup(
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
]
)