Spaces:
Sleeping
Sleeping
| # FROM python:3.9 | |
| # # RUN useradd -m -u 1000 user | |
| # # USER user | |
| # ENV PATH="/home/user/.local/bin:$PATH" | |
| # ENV HF_HOME=/tmp/huggingface | |
| # WORKDIR /app | |
| # COPY ./requirements.txt requirements.txt | |
| # RUN pip install --no-cache-dir --upgrade -r requirements.txt | |
| # COPY . /app | |
| # CMD ["gunicorn","-b", "0.0.0.0:7860","ASR_Server:app"] | |
| # Base image | |
| FROM python:3.9 | |
| # Avoid interactive prompts during install | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| # Set HF cache to avoid permission denied errors | |
| ENV HF_HOME=/tmp/huggingface | |
| # Install system packages | |
| RUN apt-get update && apt-get install -y \ | |
| libsndfile1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy code | |
| COPY . . | |
| # Install dependencies | |
| RUN pip install --upgrade pip | |
| RUN pip install -r requirements.txt | |
| # π Expose port so Docker Desktop GUI shows it | |
| EXPOSE 7860 | |
| # Run the Flask app with Gunicorn on HF's required port | |
| CMD ["gunicorn", "-b", "0.0.0.0:7860", "ASR_Server:app"] | |