extension build docs

main
Jeff Moe 2023-12-03 10:00:09 -07:00
parent 221aa29829
commit 9e9c01a66b
2 changed files with 189 additions and 0 deletions

View File

@ -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.

View File

@ -13,6 +13,8 @@ Git repo:
.. toctree::
build-extension
:maxdepth: 1
:caption: Contents: