programindz/kashmiri-streaming-speech-recognition
2
1# Hugging Face Spaces: FastAPI + ASR (CPU-only)2FROM python:3.10-slim3 4# Install system deps5RUN apt-get update && apt-get install -y \6 ffmpeg libsndfile1 git curl build-essential && \7 rm -rf /var/lib/apt/lists/*8 9# RUN git clone https://github.com/VarunGumma/IndicTransToolkit \10# && cd IndicTransToolkit \11# && pip install --editable . --use-pep51712 13WORKDIR /code14 15# # Set HF cache to a writable directory16# ENV HF_HOME=/code/app/hf_cache17# ENV TRANSFORMERS_CACHE=/code/app/hf_cache18 19# Copy code20COPY ./app /code/app21 22# Create hf_cache and make it world-writable so the non-root runtime user can use it23RUN mkdir -p /code/app/hf_cache \24 && chmod -R a+rwX /code/app/hf_cache25 26# Copy and install Python dependencies27COPY requirements.txt ./28 29# Install Python dependencies30RUN pip install --no-cache-dir -r requirements.txt31 32# Expose default port for HF Spaces33EXPOSE 786034 35# Entrypoint for FastAPI app36CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]37 