Download Dockerfile from programindz/kashmiri-streaming-speech-recognition: direct link, hf CLI and curl.
- Browser
- Download file 985 Bytes
-
https://huggingface.co/spaces/programindz/kashmiri-streaming-speech-recognition/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/programindz/kashmiri-streaming-speech-recognition/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/programindz/kashmiri-streaming-speech-recognition/resolve/main/Dockerfile
985 Bytes
| # Hugging Face Spaces: FastAPI + ASR (CPU-only) | |
| FROM python:3.10-slim | |
| # Install system deps | |
| RUN apt-get update && apt-get install -y \ | |
| ffmpeg libsndfile1 git curl build-essential && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # RUN git clone https://github.com/VarunGumma/IndicTransToolkit \ | |
| # && cd IndicTransToolkit \ | |
| # && pip install --editable . --use-pep517 | |
| WORKDIR /code | |
| # # Set HF cache to a writable directory | |
| # ENV HF_HOME=/code/app/hf_cache | |
| # ENV TRANSFORMERS_CACHE=/code/app/hf_cache | |
| # Copy code | |
| COPY ./app /code/app | |
| # Create hf_cache and make it world-writable so the non-root runtime user can use it | |
| RUN mkdir -p /code/app/hf_cache \ | |
| && chmod -R a+rwX /code/app/hf_cache | |
| # Copy and install Python dependencies | |
| COPY requirements.txt ./ | |
| # Install Python dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Expose default port for HF Spaces | |
| EXPOSE 7860 | |
| # Entrypoint for FastAPI app | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"] | |