deepak2563/opensourcetranscriptmaker
0
1FROM python:3.11-slim2 3# Install system dependencies4RUN apt-get update && apt-get install -y ffmpeg && rm -rf /var/lib/apt/lists/*5 6# Set up a new user named "user" with user ID 1000 (Required for Hugging Face Spaces)7RUN useradd -m -u 1000 user8USER user9ENV HOME=/home/user \10 PATH=/home/user/.local/bin:$PATH11 12WORKDIR $HOME/app13 14# Copy requirements and install15COPY --chown=user requirements.txt .16RUN pip install --no-cache-dir -r requirements.txt17 18# Copy the rest of the application19COPY --chown=user . $HOME/app20 21# Ensure the data directory exists and is writable22RUN mkdir -p $HOME/app/data && chmod 777 $HOME/app/data23 24# Run Uvicorn on port 7860 (Required for Hugging Face Spaces)25CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]26 