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

feat: adapt images and dependencies #196

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
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
16 changes: 15 additions & 1 deletion deploy/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,21 @@ build-llmstudio-tracker:
-f tracker.Dockerfile \
.

build: build-llmstudio-tracker build-llmstudio-proxy
build-llmstudio-tracker-bigquery:
docker build --build-arg LLMSTUDIO_VERSION=$(version) \
-t tensoropsai/llmstudio-tracker-bigquery:latest \
-t tensoropsai/llmstudio-tracker-bigquery:$(version) \
-f tracker_bigquery.Dockerfile \
.

build-llmstudio-tracker-postgresql:
docker build --build-arg LLMSTUDIO_VERSION=$(version) \
-t tensoropsai/llmstudio-tracker-postgresql:latest \
-t tensoropsai/llmstudio-tracker-postgresql:$(version) \
-f tracker_postgresql.Dockerfile \
.

build: build-llmstudio-tracker build-llmstudio-proxy build-llmstudio-tracker-bigquery build-llmstudio-tracker-postgresql

run:
docker compose -f docker-compose.yml up
1 change: 0 additions & 1 deletion deploy/tracker.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ RUN apt-get clean && apt-get update
# Install llmstudio
ARG LLMSTUDIO_VERSION
RUN pip install 'llmstudio-tracker'==${LLMSTUDIO_VERSION}
RUN pip install psycopg2-binary

CMD ["llmstudio-tracker", "server"]
13 changes: 13 additions & 0 deletions deploy/tracker_bigquery.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM python:3.11-slim
ENV PYTHONUNBUFFERED=1

# Install tools
RUN apt-get clean && apt-get update

# Install llmstudio
ARG LLMSTUDIO_VERSION
RUN pip install 'llmstudio-tracker'==${LLMSTUDIO_VERSION}
RUN pip install sqlalchemy-bigquery=="1.12.*"
RUN pip install google-cloud-bigquery-storage=="2.27.*"

CMD ["llmstudio-tracker", "server"]
12 changes: 12 additions & 0 deletions deploy/tracker_postgresql.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM python:3.11-slim
ENV PYTHONUNBUFFERED=1

# Install tools
RUN apt-get clean && apt-get update

# Install llmstudio
ARG LLMSTUDIO_VERSION
RUN pip install 'llmstudio-tracker'==${LLMSTUDIO_VERSION}
RUN pip install psycopg2-binary

CMD ["llmstudio-tracker", "server"]
564 changes: 297 additions & 267 deletions libs/core/poetry.lock

Large diffs are not rendered by default.

1,372 changes: 735 additions & 637 deletions libs/llmstudio/poetry.lock

Large diffs are not rendered by default.

15 changes: 4 additions & 11 deletions libs/proxy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,34 @@ Prompt Engineering at your fingertips

## 🌟 Features

![LLMstudio UI](https://imgur.com/wrwiIUs.png)

- **LLM Proxy Access**: Seamless access to all the latest LLMs by OpenAI, Anthropic, Google.
- **Custom and Local LLM Support**: Use custom or local open-source LLMs through Ollama.
- **Prompt Playground UI**: A user-friendly interface for engineering and fine-tuning your prompts.
- **Python SDK**: Easily integrate LLMstudio into your existing workflows.
- **Monitoring and Logging**: Keep track of your usage and performance for all requests.
- **LangChain Integration**: LLMstudio integrates with your already existing LangChain projects.
- **Batch Calling**: Send multiple requests at once for improved efficiency.
- **Smart Routing and Fallback**: Ensure 24/7 availability by routing your requests to trusted LLMs.
- **Type Casting (soon)**: Convert data types as needed for your specific use case.

## 🚀 Quickstart

Don't forget to check out [https://docs.llmstudio.ai](docs) page.

## Installation

Install the latest version of **LLMstudio** using `pip`. We suggest that you create and activate a new environment using `conda`
Install the latest version of **LLMstudio** using `pip`. We suggest that you create and activate a new virtual environment:

```bash
pip install llmstudio
pip install 'llmstudio[proxy]'
```

Install `bun` if you want to use the UI

or the lightweight version:
```bash
curl -fsSL https://bun.sh/install | bash
pip install 'llmstudio-proxy'
```

Create a `.env` file at the same path you'll run **LLMstudio**

```bash
OPENAI_API_KEY="sk-api_key"
ANTHROPIC_API_KEY="sk-api_key"
```

Now you should be able to run **LLMstudio Proxy** using the following command.
Expand Down
9 changes: 9 additions & 0 deletions libs/tracker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ Install the latest version of **LLMstudio** using `pip`. We suggest that you cre
pip install 'llmstudio[tracker]'
```

## BigQuery:
If you want to use BigQuery, you need to instal these dependencies:
- `sqlalchemy-bigquery`
- `google-cloud-bigquery-storage`

## PostgreSQL
If you want to use PostgreSQL as your database, install this dependency:
- `psycopg2-binary`

## How to run

To configure the tracker host, port, and database URI, create a `.env` file at the same path you'll run **LLMstudio** and set values for:
Expand Down
675 changes: 121 additions & 554 deletions libs/tracker/poetry.lock

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions libs/tracker/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@ authors = ["Claudio Lemos <[email protected]>"]
readme = "README.md"

[tool.poetry.dependencies]
python = ">=3.9,<3.13"
python = "^3.9"
pydantic = "^2.5"
sqlalchemy = "^2"
toml = "^0.10"
requests = "^2.31"
fastapi = "^0.115.5"
uvicorn = "^0.27"
sqlalchemy-bigquery = "^1.12.0"
google-cloud-bigquery-storage = "^2.27.0"

[tool.poetry.scripts]
llmstudio-tracker = "llmstudio_tracker.cli:main"
Expand Down