Mdean77/UV-PythonicRAG
0
1# MIKE DEAN ADAPTATION OF THE CHAINLIT DOCKERFILE USING UV FOR MANAGEMENT OF THE APP2# December 21, 20243 4# Get a distribution that has uv already installed5FROM ghcr.io/astral-sh/uv:python3.13-bookworm-slim6 7# Add user - this is the user that will run the app8# If you do not set user, the app will run as root (undesirable)9RUN useradd -m -u 1000 user10USER user11 12# Set the home directory and path13ENV HOME=/home/user \14 PATH=/home/user/.local/bin:$PATH 15 16ENV UVICORN_WS_PROTOCOL=websockets17 18 19# Set the working directory20WORKDIR $HOME/app21 22# Copy the app to the container23COPY --chown=user . $HOME/app24 25# Install the dependencies26# RUN uv sync --frozen27RUN uv sync28 29# Expose the port30EXPOSE 786031 32# Run the app33CMD ["uv", "run", "chainlit", "run", "app.py", "--host", "0.0.0.0", "--port", "7860"]34 