Skip to content

Commit

Permalink
docs: move cuda sample command to first. (#981)
Browse files Browse the repository at this point in the history
  • Loading branch information
icycodes authored Dec 8, 2023
1 parent e2447df commit bdede03
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
23 changes: 12 additions & 11 deletions website/docs/installation/docker-compose.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<Tabs>
<TabItem value="cpu" label="CPU">
<TabItem value="cuda" label="CUDA (requires NVIDIA Container Toolkit)">

```yaml title="docker-compose.yml"
version: '3.5'
Expand All @@ -18,34 +18,35 @@ services:
tabby:
restart: always
image: tabbyml/tabby
command: serve --model TabbyML/StarCoder-1B
command: serve --model TabbyML/StarCoder-1B --device cuda
volumes:
- "$HOME/.tabby:/data"
ports:
- 8080:8080
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
```
</TabItem>
<TabItem value="cuda" label="CUDA (requires NVIDIA Container Toolkit)">
<TabItem value="cpu" label="CPU">
```yaml title="docker-compose.yml"
version: '3.5'

services:
tabby:
restart: always
image: tabbyml/tabby
command: serve --model TabbyML/StarCoder-1B --device cuda
command: serve --model TabbyML/StarCoder-1B
volumes:
- "$HOME/.tabby:/data"
ports:
- 8080:8080
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
```
</TabItem>
Expand Down
8 changes: 4 additions & 4 deletions website/docs/installation/docker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<Tabs>
<TabItem value="cpu" label="CPU" default>
<TabItem value="cuda" label="CUDA (requires NVIDIA Container Toolkit)" default>

```bash title="run.sh"
docker run -it -p 8080:8080 -v $HOME/.tabby:/data tabbyml/tabby serve --model TabbyML/StarCoder-1B
docker run -it --gpus all -p 8080:8080 -v $HOME/.tabby:/data tabbyml/tabby serve --model TabbyML/StarCoder-1B --device cuda
```

</TabItem>
<TabItem value="cuda" label="CUDA (requires NVIDIA Container Toolkit)" default>
<TabItem value="cpu" label="CPU" default>

```bash title="run.sh"
docker run -it --gpus all -p 8080:8080 -v $HOME/.tabby:/data tabbyml/tabby serve --model TabbyML/StarCoder-1B --device cuda
docker run -it -p 8080:8080 -v $HOME/.tabby:/data tabbyml/tabby serve --model TabbyML/StarCoder-1B
```

</TabItem>
Expand Down

0 comments on commit bdede03

Please sign in to comment.