Skip to content

Deploy OpenAvatarChat to Runpod with Docker image setup#1

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/deploy-openavatarchat-to-runpod
Draft

Deploy OpenAvatarChat to Runpod with Docker image setup#1
Copilot wants to merge 3 commits intomainfrom
copilot/deploy-openavatarchat-to-runpod

Conversation

Copy link
Copy Markdown

Copilot AI commented Nov 24, 2025

Adds comprehensive Runpod deployment documentation for OpenAvatarChat with Windows PowerShell commands, and updates the frontend to connect to the RunPod backend for production deployment.

Changes Made

Deployment Documentation

Created docs/RUNPOD_DEPLOYMENT.md with complete deployment instructions including:

  • Git submodule initialization with --depth 1 for faster cloning
  • Docker image build commands for Windows PowerShell using chat_with_openai_compatible_bailian_cosyvoice.yaml config
  • Local testing setup on port 8888 with GPU support, mounting ./models, ./config, ./ssl_certs, ./build directories
  • Environment variable loading from .env file using --env-file flag
  • Docker Hub push instructions for lukecarniege/open-avatar-chat:0.0.1
  • Runpod configuration including:
    • Environment variables (DASHSCOPE_API_KEY, PYTHONUNBUFFERED)
    • Port mapping (8282 internal → 8888 external)
    • Startup command with config file
    • Pod configuration settings

Frontend Updates (Local Changes)

Updated the frontend submodule to connect to the RunPod backend URL for production deployment:

  • vite.config.ts: Updated to use https://2nlt0ao42gkivj-8888.proxy.runpod.net as the server URL with define block for __BACKEND_URL__
  • src/config/api.ts: Created new API URL configuration with getApiUrl() and getWsUrl() helpers
  • src/index.d.ts: Added __BACKEND_URL__ global declaration
  • src/store/index.ts: Updated to use getApiUrl() for /openavatarchat/initconfig endpoint
  • src/utils/webrtcUtils.ts: Updated to use getApiUrl() for /webrtc/offer endpoints

Note: The frontend is a git submodule. These changes are made locally and need to be committed to a forked version of the WebUI repo or built locally for deployment.

Runpod Access URL

https://2nlt0ao42gkivj-8888.proxy.runpod.net/

Quick Start

# Initialize submodules
git submodule update --init --recursive --depth 1

# Build image
docker build --build-arg CONFIG_FILE=config/chat_with_openai_compatible_bailian_cosyvoice.yaml -t open-avatar-chat:0.0.1 -f Dockerfile.cuda12.8 .

# Push to Docker Hub
docker tag open-avatar-chat:0.0.1 lukecarniege/open-avatar-chat:0.0.1
docker push lukecarniege/open-avatar-chat:0.0.1
Original prompt

I need to deploy OpenAvatarChat to Runpod. Here's what I need:

  1. Initialize git submodules with depth 1
  2. Build Docker image 'open-avatar-chat:0.0.1' using config/chat_with_openai_compatible_bailian_cosyvoice.yaml
  3. Test it locally on port 8888 with GPU support, mounting ./models, ./config, ./ssl_certs, ./build directories
  4. Load environment variables from .env file automatically
  5. Show me how to push the image to Docker Hub (username: lukecarniege)
  6. Give me the Runpod configuration (environment variables, ports, startup command)

My Runpod URL is https://2nlt0ao42gkivj-8888.proxy.runpod.net/

Provide PowerShell commands for Windows.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI self-assigned this Nov 24, 2025
@vercel
Copy link
Copy Markdown

vercel bot commented Nov 24, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
open-avatar-chat1 Error Error Nov 25, 2025 0:21am

@lukecarniege
Copy link
Copy Markdown
Owner

@copilot try it now ive restarted the runpod

Co-authored-by: lukecarniege <244867857+lukecarniege@users.noreply.github.com>
Copy link
Copy Markdown
Author

Copilot AI commented Nov 24, 2025

@copilot try it now ive restarted the runpod

I've created the comprehensive Runpod deployment guide at docs/RUNPOD_DEPLOYMENT.md (commit 9eb037c). The guide includes:

  1. Git submodule initialization with --depth 1
  2. Docker build commands for PowerShell with chat_with_openai_compatible_bailian_cosyvoice.yaml
  3. Local testing on port 8888 with GPU support and .env file loading
  4. Docker Hub push instructions for lukecarniege/open-avatar-chat:0.0.1
  5. Runpod configuration including environment variables (DASHSCOPE_API_KEY), port mapping (8282→8888), and startup command

Your Runpod URL https://2nlt0ao42gkivj-8888.proxy.runpod.net/ is included in the guide. Note that you'll need to set your DASHSCOPE_API_KEY environment variable in Runpod for the TTS to work.

Copilot AI changed the title [WIP] Deploy OpenAvatarChat to Runpod with Docker image setup Deploy OpenAvatarChat to Runpod with Docker image setup Nov 24, 2025
@lukecarniege
Copy link
Copy Markdown
Owner

@copilot how come i cant see it on github

Copy link
Copy Markdown
Author

Copilot AI commented Nov 24, 2025

@copilot how come i cant see it on github

The file is on the PR branch copilot/deploy-openavatarchat-to-runpod, not the main branch. You can view it at:

In the PR: Click on the "Files changed" tab in this PR to see docs/RUNPOD_DEPLOYMENT.md

Direct link: https://github.com/lukecarniege/OpenAvatarChat1/blob/copilot/deploy-openavatarchat-to-runpod/docs/RUNPOD_DEPLOYMENT.md

The changes will appear on the main branch after you merge this PR.

@lukecarniege
Copy link
Copy Markdown
Owner

@copilot merge it to the main

Copy link
Copy Markdown
Author

Copilot AI commented Nov 24, 2025

@copilot merge it to the main

I'm not able to merge PRs directly. You'll need to merge this PR yourself by clicking the "Merge pull request" button at the bottom of this PR page on GitHub. Once merged, the docs/RUNPOD_DEPLOYMENT.md file will be available on the main branch.

@lukecarniege
Copy link
Copy Markdown
Owner

@copilot save this as a new repo

@lukecarniege
Copy link
Copy Markdown
Owner

@copilot save this as new repo

Copy link
Copy Markdown
Author

Copilot AI commented Nov 24, 2025

@copilot save this as a new repo

I'm not able to create new repositories. To save this as a new repo, you can:

  1. Fork this repo: Click the "Fork" button at the top of the repository page
  2. Or create a new repo manually:

Alternatively, just merge this PR and the deployment guide will be part of your existing OpenAvatarChat1 repository.

@lukecarniege
Copy link
Copy Markdown
Owner

@copilot so what repo is this

Copy link
Copy Markdown
Author

Copilot AI commented Nov 24, 2025

@copilot so what repo is this

This is your repository: lukecarniege/OpenAvatarChat1

URL: https://github.com/lukecarniege/OpenAvatarChat1

This PR is on the branch copilot/deploy-openavatarchat-to-runpod. Once you merge it, the deployment guide will be added to your main branch.

@lukecarniege
Copy link
Copy Markdown
Owner

@copilot can you push it to vercel or tell me how to

Copy link
Copy Markdown
Author

Copilot AI commented Nov 24, 2025

@copilot can you push it to vercel or tell me how to

OpenAvatarChat is not suitable for Vercel. It requires:

  • GPU support for avatar generation and TTS models
  • Python runtime with CUDA
  • Large model files (several GB)

Vercel is designed for static sites and serverless functions, not GPU-intensive AI applications.

Your best option is Runpod (which you already have set up at https://2nlt0ao42gkivj-8888.proxy.runpod.net/). The deployment guide I created covers this.

If you want a public-facing URL, you can use Runpod's proxy URL or set up a custom domain pointing to your Runpod instance.

@lukecarniege
Copy link
Copy Markdown
Owner

@copilot complete the frontend

Copy link
Copy Markdown
Author

Copilot AI commented Nov 25, 2025

@copilot complete the frontend

The frontend is already included as a git submodule at src/handlers/client/rtc_client/frontend, which points to: https://github.com/HumanAIGC-Engineering/OpenAvatarChat-WebUI

It's initialized when you run:

git submodule update --init --recursive --depth 1

Could you clarify what you mean by "complete the frontend"? Are you looking to:

  1. Add new features to the UI?
  2. Fix a specific issue?
  3. Customize the appearance?
  4. Something else?

@lukecarniege
Copy link
Copy Markdown
Owner

@copilot Update the OpenAvatarChat frontend to connect to the RunPod backend URL https://2nlt0ao42gkivj-8888.proxy.runpod.net for production deployment to Vercel.

TASKS:

Update vite.config.ts:

Replace lines 8-10 with: const serverURL = 'https://2nlt0ao42gkivj-8888.proxy.runpod.net'
Add to defineConfig() object after line 22:
define: {
BACKEND_URL: JSON.stringify(serverURL),
},
Update all proxy targets to use serverURL variable instead of template strings
Change /ws target to serverURL.replace('https', 'wss')
Create src/handlers/client/rtc_client/frontend/src/config/api.ts:

declare const BACKEND_URL: string

export const API_BASE_URL = import.meta.env.PROD
? BACKEND_URL
: ''

export const getApiUrl = (path: string) => {
return ${API_BASE_URL}${path}
}

export const getWsUrl = (path: string) => {
const wsBase = API_BASE_URL.replace('https://', 'wss://').replace('http://', 'ws://')
return ${wsBase}${path}
}
Update index.d.ts:

Add at the top: declare const BACKEND_URL: string
Update index.ts:

Add import: import { getApiUrl } from '@/config/api'
Change line 154 from fetch('/openavatarchat/initconfig') to fetch(getApiUrl('/openavatarchat/initconfig'))
Update webrtcUtils.ts:

Add import: import { getApiUrl } from '@/config/api'
Replace all instances of '/webrtc/offer' with getApiUrl('/webrtc/offer') (should be 2 occurrences around lines 242 and 255)
WORKING DIRECTORY: OpenAvatarChat1

VERIFICATION: After changes, the frontend should make production requests to https://2nlt0ao42gkivj-8888.proxy.runpod.net when built, and use local proxy during development

Co-authored-by: lukecarniege <244867857+lukecarniege@users.noreply.github.com>
Copy link
Copy Markdown
Author

Copilot AI commented Nov 25, 2025

@copilot Update the OpenAvatarChat frontend to connect to the RunPod backend URL https://2nlt0ao42gkivj-8888.proxy.runpod.net for production deployment to Vercel.

TASKS:
...

I've made all the requested frontend changes locally (commit b23b0a1), but there's an issue: the frontend is a git submodule pointing to HumanAIGC-Engineering/OpenAvatarChat-WebUI. Changes to submodules can't be committed to the parent repository.

Your options:

  1. Fork the WebUI repo and commit changes there:

  2. Build locally and use the dist folder:

    • My changes are in the local frontend folder
    • Run cd src/handlers/client/rtc_client/frontend && npm install && npx vite build
    • The built dist/ folder will have the production version

The changes I made:

  • vite.config.ts - Updated to use https://2nlt0ao42gkivj-8888.proxy.runpod.net
  • src/config/api.ts - Created API URL config
  • src/index.d.ts - Added __BACKEND_URL__ declaration
  • src/store/index.ts - Uses getApiUrl() for initconfig
  • src/utils/webrtcUtils.ts - Uses getApiUrl() for webrtc/offer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants