File size: 511 Bytes
b633713
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.9

# Create a user to avoid running as root
RUN useradd -m -u 1000 user
USER user

# Set environment variables
ENV HOME=/home/user \
    PATH=/home/user/.local/bin:$PATH

# Set working directory
WORKDIR $HOME/app

# Copy project files with proper ownership
COPY --chown=user . $HOME/app

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

# Run the application
CMD ["chainlit", "run", "app.py", "--port", "7860"]