|
|
|
|
|
FROM python:3.10 |
|
|
|
RUN apt-get update && \ |
|
apt-get install -y curl && \ |
|
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \ |
|
apt-get install -y nodejs && \ |
|
apt-get clean && rm -rf /var/lib/apt/lists/* |
|
RUN node -v && npm -v |
|
RUN useradd -m -u 1000 user |
|
USER user |
|
ENV HOME=/home/user \ |
|
PATH=/home/user/.local/bin:$PATH |
|
WORKDIR /home/user/app |
|
|
|
COPY --chown=user:user requirements.txt . |
|
RUN pip install --no-cache-dir --upgrade -r requirements.txt |
|
COPY --chown=user:user . . |
|
|
|
ENV CHAINLIT_HOME=/home/user/.chainlit \ |
|
XDG_CACHE_HOME=/home/user/.cache |
|
RUN mkdir -p $CHAINLIT_HOME $XDG_CACHE_HOME |
|
|
|
|
|
EXPOSE 7860 |
|
CMD chainlit run --host 0.0.0.0 -d --port 7860 app.py |
|
|