Spaces:
Configuration error
Configuration error
Deploying Anvaya Speech AI to Render
This guide provides step-by-step instructions to deploy the Anvaya Speech Pathology & Articulation Diagnostics application on Render.
Deployment Architecture
The application is containerized using a production Dockerfile optimized for Render:
- Base Image:
python:3.11-slim-bookwormwith system audio libraries (libsndfile1,ffmpeg). - CPU PyTorch Optimization: Uses CPU-only PyTorch wheels to reduce the image size from ~4 GB to ~600 MB, fitting easily within Render memory limits.
- Model Pre-caching: Base models are pre-cached inside the container during build time so the app boots instantly on Render.
- Dynamic Port Binding: Automatically binds to Render's dynamic
$PORTenvironment variable.
Method 1: 1-Click Deployment via Render Blueprint (Recommended)
Render provides an Infrastructure-as-Code Blueprint configured in render.yaml.
Steps:
- Push your code to GitHub:
git add . git commit -m "feat: configure production Docker and Render deployment" git push origin main - Open Render Dashboard:
- Go to dashboard.render.com.
- Click New + in the top right corner and select Blueprint.
- Connect Your Repository:
- Select your GitHub repository (
speech-model). - Render will detect
render.yamlautomatically.
- Select your GitHub repository (
- Deploy:
- Click Apply. Render will build the Docker container and deploy the web service.
- Once the build completes (approx. 2 to 3 minutes), your live URL (e.g.
https://anvaya-speech-diagnostics.onrender.com) will be active.
Method 2: Manual Web Service Setup
If you prefer to configure the service manually on Render:
- In Render Dashboard, click New + $\to$ Web Service.
- Select Build and deploy from a Git repository $\to$ Connect your repository.
- Configure the service settings:
- Name:
anvaya-speech-diagnostics - Region: Oregon (or your preferred region)
- Branch:
main - Runtime: Docker
- Dockerfile Path:
Dockerfile - Instance Type: Starter (Recommended: 1 GB RAM, 1 vCPU) or Free
- Name:
- Set Environment Variables under Advanced:
Variable Value STREAMLIT_SERVER_HEADLESStrueSTREAMLIT_SERVER_ENABLE_CORSfalseSTREAMLIT_SERVER_ENABLE_XSRF_PROTECTIONfalseSTREAMLIT_BROWSER_GATHER_USAGE_STATSfalse - Click Create Web Service.
Health Check and Live Diagnostics
- Health Check Endpoint:
/_stcore/health - Microphone Permissions: Web Audio recording works natively over HTTPS (provided automatically by Render's free SSL certificates on
*.onrender.com).