From 9e9c01a66b68dbadc41e249cf69ca8fcb44c4a8d Mon Sep 17 00:00:00 2001 From: Jeff Moe Date: Sun, 3 Dec 2023 10:00:09 -0700 Subject: [PATCH] extension build docs --- docs/source/build-extension.rst | 187 ++++++++++++++++++++++++++++++++ docs/source/index.rst | 2 + 2 files changed, 189 insertions(+) create mode 100644 docs/source/build-extension.rst diff --git a/docs/source/build-extension.rst b/docs/source/build-extension.rst new file mode 100644 index 0000000..9b0e02d --- /dev/null +++ b/docs/source/build-extension.rst @@ -0,0 +1,187 @@ + +.. _build-extension: + +Build Extension +--------------- + +The extension is built into Parrot. + +Below shows how to build the Parrot extension from source code. + + +.. _dependencies: + +Dependencies +************ + +Using Debian Bookworm (stable/12). +Install OS dependencies. + +Perhaps: + +.. code-block:: bash + + sudo apt install \ + git python3-venv python3-virtualenv python3-pip + + +.. _download: + +Download +******** +To build the Parrot extension, download the source code from the git repository. + +.. code-block:: bash + + git clone https://spacecruft.org/deepcrayon/parrot-extension + cd parrot-extension/ + + +.. _setup: + +Setup +***** + +Python setup, such as: + +.. code-block:: bash + + virtualenv venv + source venv/bin/activate + + +.. _build: + +Build +***** + +Thusly: + +.. code-block:: bash + + make + +Same as: + +.. code-block:: bash + + make all + +Build parts, in order: + +.. code-block:: bash + + make setup + make server + +**Extension build** + +.. code-block:: bash + + src/extensions/vscode/build/continue-patch.vsix + +**continue_server build** + +.. code-block:: bash + + src/dist/continue_server + + +.. _versions: + +Versions +******** + +To update versions: + +.. code-block:: bash + + ${EDITOR} CHANGELOG + # git tag v0.0.0 + + +.. _clean: + +Clean +***** + +Clean. + +.. code-block:: bash + + make clean + + +.. _push: + +Push +**** + +Push to git repo. + +.. code-block:: bash + + make push + + +.. _search: + +Search +****** + +Meilisearch is used. + +Need to build it. +Used Rust 1.73.0. + +.. code-block:: bash + + git clone --recursive https://github.com/meilisearch/meilisearch + cd meilisearch/ + cargo build + ./target/debug/meilisearch + # ctrl-c, maybe note key. + mkdir -p ~/.continue/server/ + cp -p ./target/debug/meilisearch ~/.continue/server/ + # newly created: + cp -a data.ms dumps ~/.continue/server/ + + +.. _run: + +Run +**** + +Server: + +.. code-block:: bash + + ./parrot-server + + +.. _extension: + +Extension +********* + +Perhaps + +.. code-block:: bash + + cd src/extensions/vscode/ + yarn + yarn package + + +Inference Server +**************** +TO DO: add the inference server to the extension. +For now, build and use ``llama.cpp``. + + +.. code-block:: bash + + git clone https://github.com/ggerganov/llama.cpp + cd llama.cpp + # build thing. + diff --git a/docs/source/index.rst b/docs/source/index.rst index 9848cf9..ed1dde8 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -13,6 +13,8 @@ Git repo: .. toctree:: + build-extension + :maxdepth: 1 :caption: Contents: