diff --git a/README.org b/README.org index f8f4e15f..eb025743 100644 --- a/README.org +++ b/README.org @@ -15,15 +15,23 @@ #+end_src **** 2. Configure - Add Content Directories for Semantic Search to Docker-Compose - Update [[./docker-compose.yml][docker-compose.yml]] to mount your images, org-mode notes, ledger/beancount directories - If required, edit config settings in [[./docker_sample_config.yml][docker_sample_config.yml]]. + - Add Content Directories for Semantic Search to Docker-Compose + - Update [[./docker-compose.yml][docker-compose.yml]] to mount your images, org-mode notes, ledger/beancount directories + - If required, edit config settings in [[./docker_sample_config.yml][docker_sample_config.yml]]. **** 3. Run #+begin_src shell docker-compose up -d #+end_src +***** Troubleshooting + - The first run will take time. Let it run, it's mostly not hung + - Symptom: Errors out with "Killed" in error message + - Fix: Increase RAM available to Docker Containers in Docker Settings + - Refer: [[https://stackoverflow.com/a/50770267][StackOverflow Solution]], [[https://docs.docker.com/desktop/mac/#resources][Configure Resources on Docker for Mac]] + - Symptom: Errors out complaining about Tensors mismatch, null etc + - Mitigation: Delete content-type > image section from docker_sample_config.yml + *** Setup on Local Machine **** 1. Install Dependencies @@ -42,8 +50,8 @@ #+end_src **** 3. Configure - Configure application search types and their underlying data source/files in ~sample_config.yml~ - Use the ~sample_config.yml~ as reference + - Configure application search types and their underlying data source/files in ~sample_config.yml~ + - Use the ~sample_config.yml~ as reference **** 4. Run Load ML model, generate embeddings and expose API to query notes, images, transactions etc specified in config YAML @@ -67,15 +75,16 @@ ** Upgrade -*** Using Docker +*** On Docker #+begin_src shell - docker-compose up + docker-compose build #+end_src *** On Local Machine #+begin_src shell cd semantic-search git pull origin master + conda deactivate semantic-search conda env update -f environment.yml conda activate semantic-search #+end_src @@ -84,4 +93,4 @@ - [[https://huggingface.co/sentence-transformers/msmarco-MiniLM-L-6-v3][MiniLM Model]] for Asymmetric Text Search. See [[https://www.sbert.net/examples/applications/retrieve_rerank/README.html][SBert Documentation]] - [[https://github.com/openai/CLIP][OpenAI CLIP Model]] for Image Search. See [[https://www.sbert.net/examples/applications/image-search/README.html][SBert Documentation]] - Charles Cave for [[http://members.optusnet.com.au/~charles57/GTD/orgnode.html][OrgNode Parser]] - - Sven Marnach for [[https://github.com/smarnach/pyexiftool/blob/master/exiftool.py][PyExifTool]] \ No newline at end of file + - Sven Marnach for [[https://github.com/smarnach/pyexiftool/blob/master/exiftool.py][PyExifTool]] diff --git a/docker-compose.yml b/docker-compose.yml index f0cd1db8..c1115d87 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -26,7 +26,7 @@ services: - ./tests/data/:/data/music/ # It's ok if you don't have existing embeddings. # You can set this volume to point to an empty folder. - - ./tests/data/:/data/generated/ + - ./tests/data/embeddings/:/data/generated/ # Use 0.0.0.0 to explicitly set the host ip for the service on the container. https://pythonspeed.com/articles/docker-connection-refused/ command: --host="0.0.0.0" --port=8000 -c=docker_sample_config.yml -vv