Skip to content

Commit

Permalink
docs: add documentation around --webserver (#2193)
Browse files Browse the repository at this point in the history
* docs: move usage collection documentation to /administration

* docs: rename getting-started to welcome

* docs: get rid of index page, use _category_.yml to specify sidebar label

* docs: migrate links from /docs/installation to /quick-start/installation

* docs: remove --no-webserver from installation guide

* docs: adjust installation guides

* docs: add register account and connect ide page

* fix links
  • Loading branch information
wsxiaoys authored May 20, 2024
1 parent d618fa9 commit e293f23
Show file tree
Hide file tree
Showing 46 changed files with 156 additions and 83 deletions.
2 changes: 1 addition & 1 deletion clients/vim/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ If you encounter any problem or have any suggestion, please [open an issue](http

## Table of Contents

- [Tabby Plugin for Vim and NeoVim](#tabby-plugin-for-vim-and-neovim)
- Tabby Plugin for Vim and NeoVim
- [Table of Contents](#table-of-contents)
- [Requirements](#requirements)
- [Installation](#installation)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Let’s firstly take a look at what steps are needed to deploy a Tabby instance

**Step 3:** After space is built, you will be able to send requests to the APIs.

That's it! With the hosted APIs, now you can connect Tabby's [IDE extensions](/docs/getting-started) to the API endpoint. Next, we will deep dive into each step with screenshots!!
That's it! With the hosted APIs, now you can connect Tabby's [IDE extensions](/docs/extensions/installation/vscode) to the API endpoint. Next, we will deep dive into each step with screenshots!!
**Everything will be done in the Hugging Face UI. No local setup is needed.**

:::tip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,5 +159,5 @@ We are incredibly enthusiastic about the potential for enhancing the quality and
## Give it a try
To use this repository context feature:

1. Installing [tabby](/docs/installation/).
1. Installing [tabby](/docs/quick-start/installation/docker).
2. Navigate to the [Repository Context](/docs/administration/context) page and follow the instructions to set it up.
2 changes: 2 additions & 0 deletions website/docs/administration/_category_.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
label: 🔧 Administration
position: 3
3 changes: 0 additions & 3 deletions website/docs/administration/assets/webserver-running.png

This file was deleted.

9 changes: 0 additions & 9 deletions website/docs/administration/index.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
---
sidebar_position: 5
---

# ⚙️ Configuration

## Usage Collection
# Usage Collection
Tabby collects usage stats by default. This data will only be used by the Tabby team to improve its services.

### What data is collected?
## What data is collected?
We collect non-sensitive data that helps us understand how Tabby is used. For now we collects `serve` command you used to start the server.
As of the date 04/18/2024, the following information has been collected:

Expand All @@ -27,5 +21,5 @@ struct HealthState {

For an up-to-date list of the fields we have collected, please refer to [health.rs](https://github.com/TabbyML/tabby/blob/main/crates/tabby/src/services/health.rs#L11).

### How to disable it
## How to disable it
To disable usage collection, set the `TABBY_DISABLE_USAGE_COLLECTION` environment variable by `export TABBY_DISABLE_USAGE_COLLECTION=1`.
2 changes: 2 additions & 0 deletions website/docs/extensions/_category_.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
label: 💻 IDE / Editor Extensions
position: 3
9 changes: 0 additions & 9 deletions website/docs/extensions/index.mdx

This file was deleted.

2 changes: 2 additions & 0 deletions website/docs/extensions/installation/_category_.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
label: Installation
position: 1
9 changes: 0 additions & 9 deletions website/docs/extensions/installation/index.mdx

This file was deleted.

9 changes: 0 additions & 9 deletions website/docs/installation/index.mdx

This file was deleted.

3 changes: 0 additions & 3 deletions website/docs/installation/windows/status.png

This file was deleted.

2 changes: 2 additions & 0 deletions website/docs/quick-start/_category_.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
label: 🚀 Quick Start
position: 2
3 changes: 3 additions & 0 deletions website/docs/quick-start/code-completion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions website/docs/quick-start/connect-success.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions website/docs/quick-start/installation/_category_.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
label: Step 1 - Installation
position: 1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Thanks to Apple's Accelerate and CoreML frameworks, we can now run Tabby on edge
brew install tabbyml/tabby/tabby

# Start server with StarCoder-1B
tabby serve --device metal --model StarCoder-1B --no-webserver
tabby serve --device metal --model StarCoder-1B
```

The compute power of M1/M2 is limited and is likely to be sufficient only for individual usage. If you require a shared instance for a team, we recommend considering Docker hosting with CUDA or ROCm. You can find more information about Docker [here](../docker).
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ services:
tabby:
restart: always
image: tabbyml/tabby
command: serve --model StarCoder-1B --device cuda --no-webserver
command: serve --model StarCoder-1B --device cuda
volumes:
- "$HOME/.tabby:/data"
ports:
Expand All @@ -47,7 +47,7 @@ services:
restart: always
image: tabbyml/tabby
entrypoint: /opt/tabby/bin/tabby-cpu
command: serve --model StarCoder-1B --no-webserver
command: serve --model StarCoder-1B
volumes:
- "$HOME/.tabby:/data"
ports:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import TabItem from '@theme/TabItem';
```bash title="run.sh"
docker run -it --gpus all \
-p 8080:8080 -v $HOME/.tabby:/data \
tabbyml/tabby serve --model StarCoder-1B --device cuda --no-webserver
tabbyml/tabby serve --model StarCoder-1B --device cuda
```

</TabItem>
Expand All @@ -28,7 +28,7 @@ import TabItem from '@theme/TabItem';
```bash title="run.sh"
docker run --entrypoint /opt/tabby/bin/tabby-cpu -it \
-p 8080:8080 -v $HOME/.tabby:/data \
tabbyml/tabby serve --model StarCoder-1B --no-webserver
tabbyml/tabby serve --model StarCoder-1B
```

</TabItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ def app():
"cuda",
"--parallelism",
"4",
"--no-webserver",
]
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ def app():
"8000",
"--device",
"cuda",
"--no-webserver",
]
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Finally, we define the command line that actually initiates the container job:
run: |
docker run --gpus all -p 8080:8080 -v ~/.tabby:/data \
tabbyml/tabby \
serve --model TabbyML/StarCoder-1B --device cuda --no-webserver
serve --model TabbyML/StarCoder-1B --device cuda
```
## Launch the service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ sidebar_position: 3
# Windows
Running Tabby on Windows using Tabby's exe distribution.

## 1. Find the Windows release
## Find the Windows release
* Go to the Tabby release page: https://github.com/TabbyML/tabby/releases
* Click on the **Assets** dropdown for a specific release to find the Windows executable (exe) files.
![Windows release](./assets.png)

## 2. Download the release
## Download the release
* If you are using a CPU-only system, download the **tabby_x86_64-windows-msvc.exe file**.
* If you are using a GPU-enabled system, download the **tabby_x86_64-windows-msvc-cuda117.exe** file, In this example, we assume you are using CUDA 11.7.

Expand All @@ -22,12 +22,12 @@ Running Tabby on Windows using Tabby's exe distribution.
nvcc --version
```

## 3. Running Tabby locally
## Running Tabby
Open a command prompt or PowerShell window in the directory where you downloaded the Tabby executable. Run the following command:
```
.\tabby_x86_64-windows-msvc-cuda117.exe serve --model StarCoder-1B --device cuda --no-webserver
```
You should see the following output if the command runs successfully:
![Windows running output](./status.png)
# For CPU-only environments
.\tabby_x86_64-windows-msvc.exe serve --model StarCoder-1B
You can also go to `http://localhost:8080/swagger-ui/` to check the available API endpoints.
# For CUDA-enabled environments
.\tabby_x86_64-windows-msvc-cuda117.exe serve --model StarCoder-1B --device cuda
```
3 changes: 3 additions & 0 deletions website/docs/quick-start/personal-token.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions website/docs/quick-start/register-account/admin-ui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions website/docs/quick-start/register-account/homepage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions website/docs/quick-start/register-account/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
sidebar_label: Step 2 - Register Account
sidebar_position: 2
---

import SetupAdmin from './setup-admin.png';
import Homepage from './homepage.png';

# Registering Accounts

After deploying Tabby, you will need to register an account to access the instance.

## Creating an Admin Account

The first registered account after deployment will be the admin account and will be granted the **owner** role.

<img src={SetupAdmin} width={600} alt="Setup Admin" />

## Entering Homepage

Once logged in, you will be redirected to the homepage. It contains basic information about your account. More importantly, you will find the credentials you need to connect your IDE/Editor extensions to Tabby.

![Homepage](homepage.png)

## (Optional) Advanced Configuration

Tabby offers an enhanced experience with a full-featured UI interface and many enterprise-facing features. To access the admin UI, click on **Settings** in the left sidebar.

![Admin UI](admin-ui.png)

For more information on how to configure the instance, please refer to the [Administration](/docs/administration/upgrade) documentation.
3 changes: 3 additions & 0 deletions website/docs/quick-start/register-account/setup-admin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions website/docs/quick-start/setup-endpoint.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions website/docs/quick-start/setup-ide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
sidebar_label: Step 3 - Connect IDE / Editor Extensions
sidebar_position: 3
---

# Connect IDE / Editor Extensions

Once you have registered your account, you can now connect your IDE / Editor extensions to Tabby. To do this, please follow the installation guide for [IDE / Editor Extensions](/docs/extensions/installation/vscode). In this example, we'll use VSCode.

In the extension settings, you need to fill in the Endpoint provided on the homepage. This Endpoint is essential for establishing a connection between your IDE / Editor and Tabby.

![Setup Endpoint](setup-endpoint.png)

Once you have entered the Endpoint, you will receive a notification indicating that an access token is required. This access token is to authenticate you as a user of Tabby. Click on the **Set Credentials** button and enter the token acquired from the homepage.

![Personal Token](personal-token.png)

After setting the token, you will see a connected icon in the status bar of your IDE / Editor, indicating a successful connection with Tabby.

![Connected](connect-success.png)

Congratulations! You have completed the setup process. Now, you can enjoy the benefits of code completion with Tabby, making your coding experience more efficient and productive.

![Code Completion](code-completion.png)
18 changes: 9 additions & 9 deletions website/docs/getting-started.mdx → website/docs/welcome.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sidebar_position: 0
---

# 👋 Getting Started
# 👋 What's Tabby

Tabby is an open-source, self-hosted AI coding assistant. With Tabby, every team can set up its own LLM-powered code completion server with ease.

Expand All @@ -24,14 +24,14 @@ Tabby is an open-source, self-hosted AI coding assistant. With Tabby, every team

## 📄 About the Docs

| Section | Goal |
| ----------------------------------------------- | --------------------------------------------------------------------------- |
| [📚 Installation](/docs/installation) | Everything deployment: Docker, Homebrew, Hugging Face Space and many others |
| [💻 IDE / Editor Extensions](/docs/extensions) | IDE/Editor extensions that can be seamlessly integrated with Tabby |
| [🧑‍🔬 Models Directory](/docs/models) | A curated list of models that we recommend using with Tabby |
| [🏷️ API References](/api) | Checkout Tabby API Documentation |
| [🏘️ Community](#%EF%B8%8F-community) | Everything about for developers and contributing |
| [🗺️ Roadmap](/docs/roadmap) | Our future plans |
| Section | Goal |
| ------------------------------------------------------------------- | --------------------------------------------------------------------------- |
| [📚 Installation](/docs/quick-start/installation/docker) | Everything deployment: Docker, Homebrew, Hugging Face Space and many others |
| [💻 IDE / Editor Extensions](/docs/extensions/installation/vscode) | IDE/Editor extensions that can be seamlessly integrated with Tabby |
| [🧑‍🔬 Models Directory](/docs/models) | A curated list of models that we recommend using with Tabby |
| [🏷️ API References](/api) | Checkout Tabby API Documentation |
| [🏘️ Community](#%EF%B8%8F-community) | Everything about for developers and contributing |
| [🗺️ Roadmap](/docs/roadmap) | Our future plans |

## 📏 Principles

Expand Down
Loading

0 comments on commit e293f23

Please sign in to comment.