add a simple python fastapi server to serve whisper models for speech-to-text and piper for text-to-speech
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
FROM python:3.14.4-slim AS builder
|
||||
|
||||
WORKDIR /app
|
||||
COPY pyproject.toml requirements.txt ./
|
||||
COPY src src
|
||||
|
||||
RUN pip wheel --no-cache-dir --no-deps --wheel-dir wheels .
|
||||
|
||||
FROM python:3.14.4-slim AS runner
|
||||
|
||||
COPY --from=builder /app/wheels /wheels
|
||||
RUN pip install --no-cache /wheels/* && rm -rf /wheels
|
||||
RUN apt update
|
||||
RUN apt -y install ffmpeg
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
EXPOSE 8000
|
||||
CMD ["uvicorn", "audio_server:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
Reference in New Issue
Block a user