ActualSTT / Dockerfile
Percy3822's picture
Update Dockerfile
f8bf158 verified
raw
history blame contribute delete
733 Bytes
# Fast, tiny base with CPU-only
FROM python:3.10-slim
# System deps
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
libsndfile1 \
&& rm -rf /var/lib/apt/lists/*
# Writable cache to avoid HF permissions issues
ENV APP_HOME=/code \
APP_DATA=/tmp/stt_app \
HF_HOME=/tmp/stt_app/hf \
CTRANSLATE2_HOME=/tmp/stt_app/ct2
RUN mkdir -p $APP_HOME $APP_DATA && chmod -R 777 $APP_DATA
WORKDIR $APP_HOME
# Python deps
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# App
COPY app.py .
# Hugging Face Spaces expects the app on port 7860
ENV PORT=7860 HOST=0.0.0.0
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--log-level", "info"]