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

Merge dev/0.5.0 #304

Merged
merged 16 commits into from
Oct 2, 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
8 changes: 5 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
{
"name": "astra",
"image": "ghcr.io/ten-framework/astra_agents_build:0.4.0",
"image": "ghcr.io/ten-framework/ten_agent_build:0.1.0",
"customizations": {
"vscode": {
"extensions": [
"golang.go"
"golang.go",
"ms-vscode.cpptools"
]
}
},
Expand All @@ -19,6 +20,7 @@
],
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/git:1": {}
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers/features/python:1": {}
}
}
82 changes: 46 additions & 36 deletions .github/workflows/build-docker.yaml
Original file line number Diff line number Diff line change
@@ -1,53 +1,63 @@
name: Build Docker

on:
on:
push:
branches: [ "main" ]
branches: ["main"]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
tags: ["v*.*.*"]
paths-ignore:
- '.devcontainer/**'
- '.github/ISSUE_TEMPLATE/**'
- 'images/**'
- 'playground/**'
- '**.md'
- ".devcontainer/**"
- ".github/ISSUE_TEMPLATE/**"
- "images/**"
- "playground/**"
- "**.md"
pull_request:
branches: [ "main" ]
workflow_dispatch:

env:
SERVER_IMAGE_NAME: astra_agents_server
PLAYGROUND_IMAGE_NAME: astra_playground
DEMO_IMAGE_NAME: agent_demo

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-tags: true
fetch-depth: '0'
- id: pre-step
shell: bash
run: echo "image-tag=$(git describe --tags --always)" >> $GITHUB_OUTPUT
- name: Build & Publish Docker Image for Agents Server
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: ${{ github.repository_owner }}/${{ env.SERVER_IMAGE_NAME }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
tags: "${{ github.ref == 'refs/heads/main' && 'latest,' || '' }}${{ steps.pre-step.outputs.image-tag }}"
no_push: ${{ github.event_name == 'pull_request' }}
- name: Build & Publish Docker Image for Playground
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: ${{ github.repository_owner }}/${{ env.PLAYGROUND_IMAGE_NAME }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
workdir: playground
tags: "${{ github.ref == 'refs/heads/main' && 'latest,' || '' }}${{ steps.pre-step.outputs.image-tag }}"
no_push: ${{ github.event_name == 'pull_request' }}

- name: Checkout
uses: actions/checkout@v4
with:
fetch-tags: true
fetch-depth: "0"
- id: pre-step
shell: bash
run: echo "image-tag=$(git describe --tags --always)" >> $GITHUB_OUTPUT
- name: Build & Publish Docker Image for Agents Server
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: ${{ github.repository_owner }}/${{ env.SERVER_IMAGE_NAME }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
tags: "${{ github.ref == 'refs/heads/main' && 'latest,' || '' }}${{ steps.pre-step.outputs.image-tag }}"
no_push: ${{ github.event_name == 'pull_request' }}
- name: Build & Publish Docker Image for Playground
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: ${{ github.repository_owner }}/${{ env.PLAYGROUND_IMAGE_NAME }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
workdir: playground
tags: "${{ github.ref == 'refs/heads/main' && 'latest,' || '' }}${{ steps.pre-step.outputs.image-tag }}"
no_push: ${{ github.event_name == 'pull_request' }}
- name: Build & Publish Docker Image for demo
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: ${{ github.repository_owner }}/${{ env.DEMO_IMAGE_NAME }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
workdir: demo
tags: "${{ github.ref == 'refs/heads/main' && 'latest,' || '' }}${{ steps.pre-step.outputs.image-tag }}"
no_push: ${{ github.event_name == 'pull_request' }}
47 changes: 47 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "debug go",
"type": "go",
"request": "launch",
"mode": "exec",
"cwd": "${workspaceFolder}",
"program": "${workspaceFolder}/agents/bin/worker",
"env": {
"LD_LIBRARY_PATH": "${workspaceFolder}/agents/ten_packages/system/ten_runtime_go/lib:${workspaceFolder}/agents/ten_packages/system/agora_rtc_sdk/lib:${workspaceFolder}/agents/ten_packages/system/azure_speech_sdk/lib",
"TEN_APP_BASE_DIR": "${workspaceFolder}/agents"
}
},
{
"name": "debug python",
"type": "debugpy",
"request": "attach",
"connect": {
"host": "localhost",
"port": 5678
},
"preLaunchTask": "start app"
},
{
"name": "debug cpp",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/agents/bin/worker",
"cwd": "${workspaceFolder}",
"environment": [
{
"name": "LD_LIBRARY_PATH",
"value": "${workspaceFolder}/agents/ten_packages/system/agora_rtc_sdk/lib:${workspaceFolder}/agents/ten_packages/system/azure_speech_sdk/lib"
},
{
"name": "CGO_LDFLAGS",
"value": "-L${workspaceFolder}/agents/ten_packages/system/ten_runtime_go/lib -lten_runtime_go -Wl,-rpath,@loader_path/lib -Wl,-rpath,@loader_path/../lib"
}
]
}
]
}
22 changes: 22 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "build",
"command": "make build",
"args": [],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "start app",
"type": "shell",
"command": "export TEN_ENABLE_PYTHON_DEBUG=true; export TEN_PYTHON_DEBUG_PORT=5678; ./agents/bin/start",
"group": "none",
"isBackground": true
},
]
}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/ten-framework/astra_agents_build:0.4.0 AS builder
FROM ghcr.io/ten-framework/ten_agent_build:0.1.0 AS builder

ARG SESSION_CONTROL_CONF=session_control.conf

Expand Down
1 change: 0 additions & 1 deletion agents/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ func startAppBlocking(cfg *appConfig) {

appInstance.Run(true)
appInstance.Wait()
ten.UnloadAllAddons()

ten.EnsureCleanupWhenProcessExit()
}
Expand Down
59 changes: 28 additions & 31 deletions agents/manifest-lock.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"version": 1,
"packages": [
{
"type": "system",
"name": "ten_runtime_go",
"version": "0.1.0",
"hash": "ab66a8ed40c744a52cce36f26a233e669d989d9f620876156e3cc7187f214977",
"version": "0.2.0",
"hash": "8b582de5dfaa38983104143fbb6c530b3aeb463ad9e9ef51f2c72fba9862b8cc",
"dependencies": [
{
"type": "system",
Expand All @@ -21,8 +22,8 @@
{
"type": "extension",
"name": "py_init_extension_cpp",
"version": "0.1.0",
"hash": "b39c4dddbec58e1a756b7e71f41ab0ec419ab0043525ba94e6ed98b7ef634697",
"version": "0.2.0",
"hash": "e1858dfd83d18a69901cefb2edfd52e57ee326a3d306e799ff1d661f3195bb6b",
"dependencies": [
{
"type": "system",
Expand All @@ -43,8 +44,8 @@
{
"type": "extension_group",
"name": "default_extension_group",
"version": "0.1.0",
"hash": "cfadaf8f951de42965e92becc67a597501196bc3bd6f17f39a64260836393c64",
"version": "0.2.0",
"hash": "117ed3e747654fc1282129a160eaecc2cd16548e70aa22128efee21f10e185c8",
"dependencies": [
{
"type": "system",
Expand All @@ -61,8 +62,8 @@
{
"type": "extension",
"name": "agora_rtc",
"version": "0.5.1",
"hash": "de8bb179155f6a329072be87ccd624177e9bbe795956a9a275e7886a3dc31cb7",
"version": "0.7.0-rc2",
"hash": "89d7af8f84d06afbd79901e0057182280f3f430227ad6fae98ec154067ffa82c",
"dependencies": [
{
"type": "system",
Expand All @@ -72,10 +73,6 @@
"type": "system",
"name": "agora_rtc_sdk"
},
{
"type": "system",
"name": "azure_speech_sdk"
},
{
"type": "system",
"name": "nlohmann_json"
Expand All @@ -88,11 +85,23 @@
}
]
},
{
"type": "system",
"name": "azure_speech_sdk",
"version": "1.38.0",
"hash": "66a50ef361f8190fa0595d8298c135e13b73796d57174a0802631263a8f15806",
"supports": [
{
"os": "linux",
"arch": "x64"
}
]
},
{
"type": "extension",
"name": "azure_tts",
"version": "0.4.0",
"hash": "4f25e8c2a9c82f2a699a4e8378d11d2fbb31c90ec5df1718271ebfe6377a5389",
"hash": "c8f838754aaae7ed4598e99fb94b6e251382ade08fa23dbf85e91e9864d018ef",
"dependencies": [
{
"type": "system",
Expand All @@ -107,20 +116,8 @@
{
"type": "system",
"name": "ten_runtime",
"version": "0.1.0",
"hash": "b630f52ef9787132dc854fb4e90f962336be3f836baba137ca3b6dc132df0b86",
"supports": [
{
"os": "linux",
"arch": "x64"
}
]
},
{
"type": "system",
"name": "azure_speech_sdk",
"version": "1.38.0",
"hash": "66a50ef361f8190fa0595d8298c135e13b73796d57174a0802631263a8f15806",
"version": "0.2.0",
"hash": "7effdb036d5bf91894060a9230775ff8ec2598f202b8238578f99a14dbf11632",
"supports": [
{
"os": "linux",
Expand All @@ -131,8 +128,8 @@
{
"type": "system",
"name": "agora_rtc_sdk",
"version": "4.1.35+build328115",
"hash": "fd33989f9913d77e05970eb2b265fa5e08322141b7e0f8f9fd3e521f87929b3b",
"version": "4.1.36+build331418",
"hash": "74115dd35822dc3b09fbadb577b31146af704d60435ca401c0b305cce80b2ba4",
"supports": [
{
"os": "linux",
Expand All @@ -149,8 +146,8 @@
{
"type": "system",
"name": "ten_runtime_python",
"version": "0.1.0",
"hash": "a8980c39ba0cf1f21b38490c3167950f750403b1b29d756cfbacc5c5147becd7",
"version": "0.2.0",
"hash": "b44d3767f364583f8bb8e8995f6f7f49e3af27b3c9a8ddf62fa319f1fc39910e",
"dependencies": [
{
"type": "system",
Expand Down
13 changes: 9 additions & 4 deletions agents/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,27 @@
{
"type": "system",
"name": "ten_runtime_go",
"version": "0.1"
"version": "0.2"
},
{
"type": "extension",
"name": "py_init_extension_cpp",
"version": "0.1"
"version": "0.2"
},
{
"type": "extension_group",
"name": "default_extension_group",
"version": "0.1"
"version": "0.2"
},
{
"type": "extension",
"name": "agora_rtc",
"version": "=0.5.1"
"version": "=0.7.0-rc2"
},
{
"type": "system",
"name": "azure_speech_sdk",
"version": "1.38.0"
},
{
"type": "extension",
Expand Down
Loading