Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pebblo Docker README and Installation guide changes #299

Merged
merged 3 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,39 @@ Pebblo has two components.
## Pebblo Server

### Installation


#### Using `pip`

```bash
pip install pebblo --extra-index-url https://packages.daxa.ai/simple/
```

### Run Pebblo Server
##### Run Pebblo Server

```bash
pebblo
```

Pebblo Server now listens to `localhost:8000` to accept Gen-AI application data snippets for inspection and reporting.

#### Pebblo Optional Flags
##### Pebblo Optional Flags

- `--config <file>`: specify a configuration file in yaml format.


See [configuration](docs/gh_pages/docs/config.md) guide for knobs to control Pebblo Server behavior like enabling snippet anonymization, selecting specific report renderer, etc.

#### Troubleshooting
#### Using Docker

```bash
docker run -p 8000:8000 docker.daxa.ai/daxaai/pebblo
```

Local UI can be accessed by pointing the browser to `https://localhost:8000`.

See [installation](docs/gh_pages/docs/installation.md) guide for details on how to pass custom config.yaml and accessing PDF reports in the host machine.

### Troubleshooting

Refer to [troubleshooting](docs/gh_pages/docs/troubleshooting.md) guide.

Expand Down
65 changes: 46 additions & 19 deletions docs/gh_pages/docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,28 @@
> **Note**
> Please note that Pebblo requires Python version 3.9 or above to function optimally.

### Pre-requisites
## Using `pip`

Install the following prerequisites. This is needed for PDF report generation,
if you have put `weasyprint` as renderer in the config.yaml

#### Mac OSX

```
brew install pango
```bash
pip install pebblo --extra-index-url https://packages.daxa.ai/simple/
```

#### Linux (debian/ubuntu)
## Using Docker

```
sudo apt-get install libpango-1.0-0 libpangoft2-1.0-0
```bash
docker run -p 8000:8000 docker.daxa.ai/daxaai/pebblo
```

### Install weasyprint library
Local UI can be accessed by pointing the browser to `https://localhost:8000`.

```sh
pip install weasyprint
```
To pass a specific configuration file and to access PDF reports iin the host machine outside the docker container, use the following command with mounted volumes for config.yaml and the report folder.

### Pebblo Server

```
pip install pebblo
```bash
docker run \
-v /path/to/pebblo/config.yaml:/opt/pebblo/config/config.yaml \
-v /path/to/pebblo_reports:/root/.pebblo \
-p 8000:8000 docker.daxa.ai/daxaai/pebblo:latest \
--config /opt/pebblo/config/config.yaml
```

# Run Pebblo server
Expand All @@ -50,3 +45,35 @@ see [troubleshooting](troubleshooting.md) if you face any issues.
```bash
pebblo --config [PATH TO CONFIG FILE]
```

# Enhanced PDF reporting

Pebblo supports two PDF rendering options:

1. `xhtml2pdf` (default)
1. `weasyprint`

This is selected using `renderer` setting in the config.yaml

`weasyprint` produces an enhanced visual look and feel. This renderer option requires the following additional prerequisites. This is needed for PDF report generation,

### Install weasyprint library

```sh
pip install weasyprint
```

### Install Pango library

#### Mac OSX

```
brew install pango
```

#### Linux (debian/ubuntu)

```
sudo apt-get install libpango-1.0-0 libpangoft2-1.0-0
```