File size: 611 Bytes
982a2f2
68cf355
 
982a2f2
 
68cf355
 
982a2f2
d0650af
 
68cf355
 
982a2f2
68cf355
 
982a2f2
68cf355
 
 
 
 
 
982a2f2
68cf355
 
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
FROM python:3.9

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

# Set environment variables
ENV HOME=/home/user \
    PATH=/home/user/.local/bin:$PATH \
    OPENAI_API_KEY=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

# Set the working directory
WORKDIR $HOME/app

# Copy the application files
COPY --chown=user . $HOME/app

# Copy the requirements file and install dependencies
COPY requirements.txt $HOME/app/requirements.txt
RUN pip install --user -r requirements.txt

# Expose the port and set the command to run the application
CMD ["chainlit", "run", "app.py", "--port", "7860"]