Blablablab/audio-classification
0
1FROM python:3.11-slim2 3# Create non-root user (HF Spaces requires UID 1000)4RUN useradd -m -u 1000 potato5 6# Install system dependencies7RUN apt-get update && \8 apt-get install -y --no-install-recommends git && \9 rm -rf /var/lib/apt/lists/*10 11# Set working directory12WORKDIR /app13 14# Copy requirements first for layer caching15COPY requirements.txt .16RUN pip install --no-cache-dir -r requirements.txt gunicorn17 18# Copy the application source19COPY . .20 21# Install potato22RUN pip install --no-cache-dir -e .23 24# Copy entrypoint25COPY entrypoint.sh /entrypoint.sh26RUN chmod +x /entrypoint.sh27 28# Create directories for output29RUN mkdir -p /app/annotation_output && \30 chown -R potato:potato /app31 32# Switch to non-root user33USER potato34 35# HuggingFace Spaces expects port 786036EXPOSE 786037 38ENV POTATO_CONFIG=config.yaml39ENV PORT=786040 41ENTRYPOINT ["/entrypoint.sh"]42 