# Use the official python 3.9 image FROM python:3.10-slim-bullseye # Set the working directory to corrent folder WORKDIR . RUN useradd -m -u 1000 user USER user ENV PATH="/home/user/.local/bin:$PATH" # Copy the requirements to working directory COPY --chown=user ./requirements.txt requirements.txt # Install all packages in requirements.txt RUN pip install --no-cache-dir --upgrade -r ./requirements.txt WORKDIR app/ COPY --chown=user . /app EXPOSE 7860 CMD ["python", "-m", "chainlit", "run", "model.py", "-h", "--port", "7860", "--host", "0.0.0.0"]