From d57bd41019fe96056bdb0f12c67fce742fc44be0 Mon Sep 17 00:00:00 2001 From: Debanjum Singh Solanky Date: Tue, 2 Aug 2022 21:12:27 +0300 Subject: [PATCH] Add Instruction to Install, Run Khoj via Pip to Readme #Development --- Readme.md | 42 +++++++++++++++++++++++++++++++++++++++--- setup.py | 3 ++- 2 files changed, 41 insertions(+), 4 deletions(-) diff --git a/Readme.md b/Readme.md index 98f48979..cd93e035 100644 --- a/Readme.md +++ b/Readme.md @@ -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 diff --git a/setup.py b/setup.py index 768dea56..0c9caa98 100644 --- a/setup.py +++ b/setup.py @@ -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", ] )