File size: 593 Bytes
3eb9552
 
4b77608
 
3eb9552
 
 
4b77608
 
 
 
 
 
3eb9552
4b77608
 
 
3eb9552
4b77608
 
 
3eb9552
 
 
4b77608
3eb9552
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
FROM python:3.10-slim

# System dependencies
RUN apt-get update && apt-get install -y \
    build-essential \
    && rm -rf /var/lib/apt/lists/*

# Set up user and working directory
RUN useradd -m -u 1000 appuser
USER appuser
ENV HOME=/home/appuser \
    PATH=/home/appuser/.local/bin:$PATH
WORKDIR $HOME/app

# Install python dependencies
COPY --chown=appuser requirements.txt .
RUN pip install --no-cache-dir --user -r requirements.txt

# Copy source code and install the package
COPY --chown=appuser . .
RUN pip install --user -e .

EXPOSE 7860

# Start Gradio app
CMD ["python", "app.py"]