Spaces:
Running
Running
File size: 908 Bytes
f928012 967dfaa bf90550 f928012 ac711b2 bf90550 f928012 bf90550 f928012 bf90550 f928012 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# 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
# Run the Flask app with Gunicorn on HF's required port
CMD ["gunicorn", "-b", "0.0.0.0:7860", "ASR_Server:app"]
|