File size: 456 Bytes
42dad54
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM python:3.10

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

WORKDIR /app

# Copy and install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy project files and assign ownership
COPY --chown=user:user . .

# Switch to non-root user
USER user

# Expose port for Gradio frontend
EXPOSE 7860

# Launch Gradio (which will internally launch FastAPI)
CMD ["python", "main_gradio.py"]