chainlit_doc / Dockerfile
heyday1234's picture
Update Dockerfile
8d4e23b verified
raw
history blame contribute delete
603 Bytes
# Use the official python 3.10 image
FROM python:3.10-slim-bullseye
# Set the working directory to user's home folder
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
# Copy the requirements to working directory
COPY --chown=user:user ./requirements.txt ./requirements.txt
# Install all packages in requirements.txt
RUN pip install --no-cache-dir --user --upgrade -r ./requirements.txt
COPY --chown=user:user . $HOME/app
EXPOSE 8080
CMD ["python", "-m", "chainlit", "run", "model.py", "-h", "--port", "8080", "--host", "0.0.0.0"]