Skip to content

Commit 5bf641d

Browse files
authored
docs(docker): optimize installation guide, runs background, and add `… (#3792)
* docs(docker): optimize installation guide, runs background, and add `:Z` option for SELinux Signed-off-by: Wei Zhang <[email protected]> * docs(docker): use collapse for selinux Signed-off-by: Wei Zhang <[email protected]> --------- Signed-off-by: Wei Zhang <[email protected]>
1 parent afd9c80 commit 5bf641d

File tree

1 file changed

+38
-5
lines changed

1 file changed

+38
-5
lines changed

website/docs/quick-start/installation/docker.mdx

+38-5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
sidebar_position: 0
33
---
44

5+
import Collapse from '@site/src/components/Collapse';
6+
57
# Docker
68

79
This guide explains how to launch Tabby using docker.
@@ -13,14 +15,45 @@ import TabItem from '@theme/TabItem';
1315
<TabItem value="cuda" label="CUDA" default>
1416

1517

16-
For CUDA support in Tabby, install the [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html).
17-
After installation, you can start Tabby with the following command:
18+
To run Tabby with CUDA support in Docker, please install the [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html).
19+
Once installed, you can launch Tabby using the command below:
1820

1921
```bash title="run.sh"
20-
docker run -it --gpus all \
21-
-p 8080:8080 -v $HOME/.tabby:/data \
22+
docker run -d \
23+
--name tabby \
24+
--gpus all \
25+
-p 8080:8080 \
26+
-v $HOME/.tabby:/data \
27+
registry.tabbyml.com/tabbyml/tabby \
28+
serve \
29+
--model StarCoder-1B \
30+
--chat-model Qwen2-1.5B-Instruct \
31+
--device cuda
32+
```
33+
34+
<Collapse title="For the systems with SELinux enabled, you may need to add the `:Z` option to the volume mount">
35+
36+
```bash title="run.sh"
37+
docker run -d \
38+
--name tabby \
39+
--gpus all \
40+
-p 8080:8080 \
41+
-v $HOME/.tabby:/data:Z \
2242
registry.tabbyml.com/tabbyml/tabby \
23-
serve --model StarCoder-1B --chat-model Qwen2-1.5B-Instruct --device cuda
43+
serve \
44+
--model StarCoder-1B \
45+
--chat-model Qwen2-1.5B-Instruct \
46+
--device cuda
47+
```
48+
49+
</Collapse>
50+
51+
After Tabby is running, you can access it at [http://localhost:8080](http://localhost:8080).
52+
53+
To view the logs, you can use the following command:
54+
55+
```bash
56+
docker logs -f tabby
2457
```
2558

2659
</TabItem>

0 commit comments

Comments
 (0)