---
sidebar_position: 1
---

# Docker Compose
This guide explains how to launch Tabby using docker-compose.

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<Tabs>
  <TabItem value="cpu" label="CPU">

```yaml title="docker-compose.yml"
version: '3.5'

services:
  tabby:
    restart: always
    image: tabbyml/tabby
    command: serve --model TabbyML/SantaCoder-1B
    volumes:
      - "$HOME/.tabby:/data"
    ports:
      - 8080:8080
```

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

```yaml title="docker-compose.yml"
version: '3.5'
services:
  tabby:
    restart: always
    image: tabbyml/tabby
    command: serve --model TabbyML/SantaCoder-1B --device cuda
    volumes:
      - "$HOME/.tabby:/data"
    ports:
      - 8080:8080
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [gpu]
```

  </TabItem>
</Tabs>

