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

CI for each module #168

Closed
wants to merge 2 commits into from
Closed
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
25 changes: 17 additions & 8 deletions .github/workflows/upload-pypi-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,23 @@ jobs:
run: |
echo "VERSION=$(poetry version --short)" >> $GITHUB_ENV

- name: Build and tag Docker image
# Build and tag Docker images with both :latest and :[NEW_VERSION]
- name: Proxy Build and tag Docker images
working-directory: ./deploy
run: |
docker build \
--build-arg LLMSTUDIO_VERSION=${{ env.VERSION }} \
-t tensoropsai/llmstudio:${{ env.VERSION }} \
.
make version=${{ env.VERSION }} build-proxy

- name: Push Docker image to Docker Hub
# Build and tag Docker images with both :latest and :[NEW_VERSION]
- name: Tracker Build and tag Docker images
working-directory: ./deploy
run: |
docker push tensoropsai/llmstudio:${{ env.VERSION }}

make version=${{ env.VERSION }} build-tracker

# Push both Docker images to Docker Hub
- name: Push Proxy Docker images to Docker Hub
run: |
docker push tensoropsai/llmstudio-proxy:${{ env.VERSION }}
# Push both Docker images to Docker Hub
- name: Push Tracker Docker images to Docker Hub
run: |
docker push tensoropsai/llmstudio-tracker:${{ env.VERSION }}
27 changes: 17 additions & 10 deletions .github/workflows/upload-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,24 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}

# Build and tag Docker images with both :latest and :[NEW_VERSION]
- name: Build and tag Docker images
- name: Proxy Build and tag Docker images
working-directory: ./deploy
run: |
docker build \
--build-arg LLMSTUDIO_VERSION=${{ env.VERSION }} \
-t tensoropsai/llmstudio:latest \
-t tensoropsai/llmstudio:${{ env.VERSION }} \
.
make version=${{ env.VERSION }} build-proxy

# Build and tag Docker images with both :latest and :[NEW_VERSION]
- name: Tracker Build and tag Docker images
working-directory: ./deploy
run: |
make version=${{ env.VERSION }} build-tracker

# Push both Docker images to Docker Hub
- name: Push Proxy Docker images to Docker Hub
run: |
docker push tensoropsai/llmstudio-proxy:${{ env.VERSION }}
docker push tensoropsai/llmstudio-proxy:latest
# Push both Docker images to Docker Hub
- name: Push Docker images to Docker Hub
- name: Push Tracker Docker images to Docker Hub
run: |
docker push tensoropsai/llmstudio:${{ env.VERSION }}
docker push tensoropsai/llmstudio:latest

docker push tensoropsai/llmstudio-tracker:${{ env.VERSION }}
docker push tensoropsai/llmstudio-tracker:latest
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,30 +26,33 @@ Don't forget to check out [https://docs.llmstudio.ai](docs) page.

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

For full version:
```bash
pip install llmstudio
pip install 'llmstudio[proxy,tracker]'
```

Install `bun` if you want to use the UI

For lightweight (core) version:
```bash
curl -fsSL https://bun.sh/install | bash
pip install llmstudio
```

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"
VERTEXAI_KEY="sk-api-key"
```

Now you should be able to run **LLMstudio** using the following command.

```bash
llmstudio server --ui
llmstudio server --proxy --tacker
```

When the `--ui` flag is set, you'll be able to access the UI at [http://localhost:3000](http://localhost:3000)
When the `--proxy` flag is set, you'll be able to access the [Swagger at http://0.0.0.0:50001/docs (default port)](http://0.0.0.0:50001/docs)

When the `--tracker` flag is set, you'll be able to access the [Swagger at http://0.0.0.0:50002/docs (default port)](http://0.0.0.0:50002/docs)

## 📖 Documentation

Expand Down
18 changes: 18 additions & 0 deletions deploy/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
build-proxy:
docker build --build-arg LLMSTUDIO_VERSION=$(version) \
-t tensoropsai/llmstudio-proxy:latest \
-t tensoropsai/llmstudio-proxy:$(version) \
-f proxy.Dockerfile \
.

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

build: build-tracker build-proxy

run:
docker compose -f docker-compose.yml up
17 changes: 17 additions & 0 deletions deploy/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: "3.8"

services:
llmstudio-proxy:
image: tensoropsai/llmstudio-proxy
restart: always
env_file:
- .env
ports:
- 8001:50001
llmstudio-tracking:
image: tensoropsai/llmstudio-tracker
restart: always
env_file:
- .env
ports:
- 8002:50002
11 changes: 11 additions & 0 deletions deploy/proxy.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
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[proxy]'==${LLMSTUDIO_VERSION}

CMD ["llmstudio", "server", "--proxy"]
12 changes: 12 additions & 0 deletions deploy/tracker.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", "server", "--tracker"]
15 changes: 9 additions & 6 deletions libs/llmstudio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,30 +26,33 @@ Don't forget to check out [https://docs.llmstudio.ai](docs) page.

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

For full version:
```bash
pip install llmstudio
pip install 'llmstudio[proxy,tracker]'
```

Install `bun` if you want to use the UI

For lightweight (core) version:
```bash
curl -fsSL https://bun.sh/install | bash
pip install llmstudio
```

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"
VERTEXAI_KEY="sk-api-key"
```

Now you should be able to run **LLMstudio** using the following command.

```bash
llmstudio server --ui
llmstudio server --proxy --tacker
```

When the `--ui` flag is set, you'll be able to access the UI at [http://localhost:3000](http://localhost:3000)
When the `--proxy` flag is set, you'll be able to access the [Swagger at http://0.0.0.0:50001/docs (default port)](http://0.0.0.0:50001/docs)

When the `--tracker` flag is set, you'll be able to access the [Swagger at http://0.0.0.0:50002/docs (default port)](http://0.0.0.0:50002/docs)

## 📖 Documentation

Expand Down
6 changes: 3 additions & 3 deletions libs/llmstudio/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "llmstudio"
version = "1.0.0"
version = "1.0.1"
description = "Prompt Perfection at Your Fingertips"
authors = ["Cláudio Lemos <[email protected]>"]
license = "MIT"
Expand All @@ -20,8 +20,8 @@ python-dotenv = "^0"
langchain = "^0"
langchain-experimental = "^0"
llmstudio-core = "1.0.0"
llmstudio-tracker = { version = "1.0.0", optional = true }
llmstudio-proxy = { version = "1.0.0", optional = true }
llmstudio-tracker = { version = "1.0.1", optional = true }
llmstudio-proxy = { version = "1.0.1", optional = true }

[tool.poetry.extras]
proxy = ["llmstudio-proxy"]
Expand Down
6 changes: 3 additions & 3 deletions libs/proxy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ OPENAI_API_KEY="sk-api_key"
ANTHROPIC_API_KEY="sk-api_key"
```

Now you should be able to run **LLMstudio** using the following command.
Now you should be able to run **LLMstudio Proxy** using the following command.

```bash
llmstudio server --ui
llmstudio server --proxy
```

When the `--ui` flag is set, you'll be able to access the UI at [http://localhost:3000](http://localhost:3000)
When the `--proxy` flag is set, you'll be able to access the [Swagger at http://0.0.0.0:50001/docs (default port)](http://0.0.0.0:50001/docs)

## 📖 Documentation

Expand Down
2 changes: 1 addition & 1 deletion libs/proxy/llmstudio_proxy/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def assign_port(default_port=None):


defaults = {
"LLMSTUDIO_ENGINE_HOST": "localhost",
"LLMSTUDIO_ENGINE_HOST": "0.0.0.0",
"LLMSTUDIO_ENGINE_PORT": str(assign_port(50001)),
}

Expand Down
2 changes: 1 addition & 1 deletion libs/proxy/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "llmstudio-proxy"
version = "1.0.0"
version = "1.0.1"
description = ""
authors = ["Diogo Goncalves <[email protected]>"]
readme = "README.md"
Expand Down
15 changes: 4 additions & 11 deletions libs/tracker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,29 +27,22 @@ Don't forget to check out [https://docs.llmstudio.ai](docs) page.
Install the latest version of **LLMstudio** using `pip`. We suggest that you create and activate a new environment using `conda`

```bash
pip install llmstudio
```

Install `bun` if you want to use the UI

```bash
curl -fsSL https://bun.sh/install | bash
pip install 'llmstudio[tracker]'
```

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** using the following command.
Now you should be able to run **LLMstudio Tracker** using the following command.

```bash
llmstudio server --ui
llmstudio server --tacker
```

When the `--ui` flag is set, you'll be able to access the UI at [http://localhost:3000](http://localhost:3000)
When the `--tracker` flag is set, you'll be able to access the [Swagger at http://0.0.0.0:50002/docs (default port)](http://0.0.0.0:50002/docs)

## 📖 Documentation

Expand Down
2 changes: 1 addition & 1 deletion libs/tracker/llmstudio_tracker/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def assign_port(default_port=None):


defaults = {
"LLMSTUDIO_TRACKING_HOST": "localhost",
"LLMSTUDIO_TRACKING_HOST": "0.0.0.0",
"LLMSTUDIO_TRACKING_PORT": str(assign_port(50002)),
"LLMSTUDIO_TRACKING_URI": "sqlite:///./llmstudio_mgmt.db",
}
Expand Down
2 changes: 1 addition & 1 deletion libs/tracker/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "llmstudio-tracker"
version = "1.0.0"
version = "1.0.1"
description = ""
authors = ["Diogo Goncalves <[email protected]>"]
readme = "README.md"
Expand Down
Loading