File size: 729 Bytes
bee5339
09815b3
bee5339
 
09815b3
 
bee5339
68e1e39
 
09815b3
 
bee5339
09815b3
 
bee5339
09815b3
 
bee5339
 
 
 
 
 
09815b3
bee5339
 
 
 
 
09815b3
bee5339
09815b3
 
bee5339
 
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
FROM python:3.9-slim

# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
    ffmpeg \
    libsndfile1 \
    git \
    build-essential \
    python3-dev \
    && rm -rf /var/lib/apt/lists/*

# Create non-root user
RUN useradd -m -u 1000 user

# Set working directory
WORKDIR /app

# Copy requirements first (for better caching)
COPY --chown=user:user requirements.txt ./

# Install Python dependencies
RUN pip install --no-cache-dir --upgrade pip && \
    pip install --no-cache-dir -r requirements.txt

# Copy the rest of the app
COPY --chown=user:user . .

# Switch to non-root user
USER user

# Expose port (for Gradio/Streamlit)
EXPOSE 7860

# Run command
CMD ["python", "app.py"]