Skip to content

Commit ef4a3c3

Browse files
committed
added joinly base
0 parents  commit ef4a3c3

File tree

100 files changed

+15006
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+15006
-0
lines changed

.devcontainer/Dockerfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
FROM ghcr.io/astral-sh/uv:latest AS uv
2+
3+
FROM mcr.microsoft.com/vscode/devcontainers/base:bookworm
4+
5+
RUN apt-get update && apt-get install -y --no-install-recommends \
6+
libnss3 \
7+
libatk1.0-0 \
8+
libatk-bridge2.0-0 \
9+
libcups2 \
10+
libxcomposite1 \
11+
libxrandr2 \
12+
libgbm1 \
13+
libasound2 \
14+
libpangocairo-1.0-0 \
15+
libxdamage1 \
16+
libxfixes3 \
17+
libxkbcommon0 \
18+
pulseaudio \
19+
pulseaudio-utils \
20+
ffmpeg \
21+
xvfb \
22+
x11vnc \
23+
&& rm -rf /var/lib/apt/lists/*
24+
25+
ENV XDG_RUNTIME_DIR=/home/vscode/.xdg_runtime
26+
RUN mkdir -p $XDG_RUNTIME_DIR && chown vscode: $XDG_RUNTIME_DIR
27+
28+
COPY --from=uv --chown=vscode: /uv /uvx /bin/

.devcontainer/devcontainer.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"name": "joinly",
3+
"build": {
4+
"context": "..",
5+
"dockerfile": "Dockerfile"
6+
},
7+
"features": {
8+
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": { },
9+
"ghcr.io/devcontainers/features/node": {
10+
"version": "lts"
11+
}
12+
},
13+
"customizations": {
14+
"vscode": {
15+
"extensions": [
16+
"charliermarsh.ruff",
17+
"ms-azuretools.vscode-docker",
18+
"ms-python.python",
19+
"ms-python.vscode-pylance",
20+
"tamasfe.even-better-toml",
21+
"yzhang.markdown-all-in-one"
22+
]
23+
}
24+
},
25+
"containerEnv": {
26+
"DISPLAY": "dummy",
27+
"PYTHONUNBUFFERED": "True",
28+
"UV_LINK_MODE": "copy",
29+
"UV_PROJECT_ENVIRONMENT": "/home/vscode/.venv"
30+
},
31+
"postCreateCommand": "uv sync --frozen && uv run scripts/download_assets.py",
32+
"postStartCommand": "uv run pre-commit install",
33+
"remoteUser": "vscode"
34+
}

.dockerignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.venv
2+
__pycache__
3+
.gitignore
4+
.git
5+
docker/
6+
docker-compose.yml
7+
.vscode
8+
.devcontainer
9+
.pre-commit-config.yaml
10+
.ruff_cache
11+
node_modules
12+
pytest_cache
13+
.env

.env.example

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# for OpenAI LLM
2+
# change key and model to your desired one
3+
JOINLY_LLM_MODEL=gpt-4o
4+
JOINLY_LLM_PROVIDER=openai
5+
OPENAI_API_KEY=your-openai-api-key
6+
# for Anthropic LLM
7+
# change key and model to your desired one
8+
JOINLY_LLM_MODEL=claude-3-5-haiku-latest
9+
JOINLY_LLM_PROVIDER=anthropic
10+
ANTHROPIC_API_KEY=your-anthropic-api-key
11+
12+
# for Google LLM
13+
# change key and model to your desired one
14+
JOINLY_MODEL_NAME=gemini-2.5-flash-lite
15+
JOINLY_MODEL_PROVIDER=google
16+
GOOGLE_API_KEY=your-google-api-key
17+
18+
# for Azure OpenAI LLM
19+
# change key and model to your desired one (and version)
20+
JOINLY_LLM_MODEL=gpt-4o
21+
JOINLY_LLM_PROVIDER=azure
22+
AZURE_OPENAI_API_KEY=your-azure-openai-api-key
23+
AZURE_OPENAI_ENDPOINT=https://your-azure-openai-endpoint.openai.azure.com/
24+
OPENAI_API_VERSION=2024-12-01-preview
25+
26+
# for Ollama LLM (requires ollama pull <model>)
27+
# Note: only works when using the client_example.py, or another script outside of the docker,
28+
# for direct usage with --client, you would need additional setup
29+
# note that small models often fail to correctly call the necessary tools, so try with caution
30+
# change to your desired model with tool calling
31+
JOINLY_LLM_MODEL=smollm2:1.7b
32+
JOINLY_LLM_PROVIDER=ollama
33+
# for Ollama at a different host, set following variables to your desired host and port:
34+
# OLLAMA_HOST=127.0.0.1
35+
# OLLAMA_PORT=11434
36+
37+
# Deepgram Text-to-Speech/Transcription, set args "--tts deepgram" or/and "--stt deepgram"
38+
DEEPGRAM_API_KEY=your-deepgram-api-key
39+
40+
# ElevenLabs Text-to-Speech, set arg "--tts elevenlabs"
41+
ELEVENLABS_API_KEY=your-elevenlabs-api-key
42+
43+
# Resemble AI Text-to-Speech, set arg "--tts resemble"
44+
RESEMBLE_API_KEY=your-resemble-ai-api-key
45+
46+
# For the example client (tavily web search)
47+
TAVILY_API_KEY=your-tavily-api-key

.github/workflows/lint.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags-ignore:
8+
- '**'
9+
pull_request:
10+
workflow_call:
11+
12+
jobs:
13+
ruff:
14+
name: Ruff linting and uv lock
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: astral-sh/setup-uv@v5
19+
with:
20+
enable-cache: true
21+
- run: uv run pre-commit run --all-files --show-diff-on-failure
22+
23+
pyright:
24+
name: Pyright type checking
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v4
28+
- uses: astral-sh/setup-uv@v5
29+
with:
30+
enable-cache: true
31+
- run: uv run pyright
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Release Client
2+
3+
on:
4+
push:
5+
tags:
6+
- client-v[0-9]+.*
7+
8+
jobs:
9+
10+
lint:
11+
uses: ./.github/workflows/lint.yml
12+
13+
publish:
14+
needs: lint
15+
runs-on: ubuntu-latest
16+
environment:
17+
name: joinly-client
18+
url: https://pypi.org/p/joinly-client/
19+
permissions:
20+
id-token: write
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
26+
- name: Setup uv
27+
uses: astral-sh/setup-uv@v5
28+
29+
- name: Install dependencies
30+
run: uv sync --locked --all-groups --package joinly-client
31+
32+
- name: Build package
33+
run: uv build --package joinly-client
34+
35+
- name: Publish package
36+
run: uv publish
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Release Common
2+
3+
on:
4+
push:
5+
tags:
6+
- common-v[0-9]+.*
7+
8+
jobs:
9+
10+
lint:
11+
uses: ./.github/workflows/lint.yml
12+
13+
publish:
14+
needs: lint
15+
runs-on: ubuntu-latest
16+
environment:
17+
name: joinly-common
18+
url: https://pypi.org/p/joinly-common/
19+
permissions:
20+
id-token: write
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
26+
- name: Setup uv
27+
uses: astral-sh/setup-uv@v5
28+
29+
- name: Install dependencies
30+
run: uv sync --locked --all-groups --package joinly-common
31+
32+
- name: Build package
33+
run: uv build --package joinly-common
34+
35+
- name: Publish package
36+
run: uv publish

.github/workflows/release.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- v[0-9]+.*
7+
8+
env:
9+
REGISTRY: ghcr.io
10+
IMAGE_NAME: ${{ github.repository }}
11+
12+
jobs:
13+
14+
lint:
15+
uses: ./.github/workflows/lint.yml
16+
17+
docker:
18+
needs: lint
19+
strategy:
20+
matrix:
21+
include:
22+
- dockerfile: docker/Dockerfile
23+
suffix: ''
24+
platforms: linux/amd64,linux/arm64
25+
- dockerfile: docker/Dockerfile.lite
26+
suffix: '-lite'
27+
platforms: linux/amd64,linux/arm64
28+
- dockerfile: docker/Dockerfile.cuda
29+
suffix: '-cuda'
30+
platforms: linux/amd64
31+
32+
runs-on: ubuntu-latest
33+
permissions:
34+
contents: read
35+
packages: write
36+
id-token: write
37+
38+
steps:
39+
- name: Checkout repository
40+
uses: actions/checkout@v4
41+
42+
- name: Install cosign
43+
if: github.event_name != 'pull_request'
44+
uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 #v3.5.0
45+
with:
46+
cosign-release: 'v2.2.4'
47+
48+
- name: Set up QEMU
49+
uses: docker/setup-qemu-action@v3
50+
51+
- name: Set up Docker Buildx
52+
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
53+
54+
- name: Log into registry ${{ env.REGISTRY }}
55+
if: github.event_name != 'pull_request'
56+
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
57+
with:
58+
registry: ${{ env.REGISTRY }}
59+
username: ${{ github.actor }}
60+
password: ${{ secrets.GITHUB_TOKEN }}
61+
62+
- name: Extract Docker metadata
63+
id: meta
64+
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
65+
with:
66+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
67+
tags: |
68+
type=raw,value=${{ github.ref_name }}${{ matrix.suffix }}
69+
type=raw,value=latest${{ matrix.suffix }}
70+
71+
- name: Build and push Docker image
72+
id: build-and-push
73+
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
74+
with:
75+
context: .
76+
file: ${{ matrix.dockerfile }}
77+
platforms: ${{ matrix.platforms }}
78+
push: ${{ github.event_name != 'pull_request' }}
79+
tags: ${{ steps.meta.outputs.tags }}
80+
labels: ${{ steps.meta.outputs.labels }}
81+
cache-from: type=gha
82+
cache-to: type=gha,mode=max
83+
84+
- name: Sign the published Docker image
85+
if: ${{ github.event_name != 'pull_request' }}
86+
env:
87+
TAGS: ${{ steps.meta.outputs.tags }}
88+
DIGEST: ${{ steps.build-and-push.outputs.digest }}
89+
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
90+
91+
release:
92+
needs: docker
93+
runs-on: ubuntu-latest
94+
concurrency: release-${{ github.ref_name }}
95+
permissions:
96+
contents: write
97+
steps:
98+
- uses: actions/checkout@v4
99+
- uses: taiki-e/create-gh-release-action@v1
100+
with:
101+
changelog: CHANGELOG.md
102+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)