feat: Add Gradio UI apps for AI services

- embeddings.py: BGE embeddings demo with similarity
- stt.py: Whisper speech-to-text demo
- tts.py: XTTS text-to-speech demo
- theme.py: Shared DaviesTechLabs Gradio theme
- K8s deployments for each app
This commit is contained in:
2026-02-01 20:45:10 -05:00
parent 8f5de96130
commit 1f833e0124
11 changed files with 1733 additions and 1 deletions

36
Dockerfile Normal file
View File

@@ -0,0 +1,36 @@
FROM python:3.13-slim
WORKDIR /app
# Install uv for fast, reliable package management
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
# Install system dependencies for audio processing
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
ffmpeg \
libsndfile1 \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first for better caching
COPY requirements.txt .
RUN uv pip install --system --no-cache -r requirements.txt
# Copy application code
COPY *.py .
# Set environment variables
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
ENV GRADIO_SERVER_NAME=0.0.0.0
ENV GRADIO_SERVER_PORT=7860
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \
CMD curl -f http://localhost:7860/ || exit 1
# Expose Gradio port
EXPOSE 7860
# Run the application (override with specific app)
CMD ["python", "app.py"]