Spaces:
Sleeping
Sleeping
File size: 971 Bytes
c18cd75 |
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 44 45 46 |
# 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"]
|