# 1. Base Image
FROM python:3.10-slim

# 2. Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV POETRY_NO_INTERACTION=1 \
    POETRY_VIRTUALENVS_CREATE=false

# 3. Set working directory
WORKDIR /app

# 4. Install poetry
RUN pip install --no-cache-dir poetry

# 5. Copy dependency definition files
COPY pyproject.toml ./

# 6. Install dependencies
# Using --no-cache-dir to keep the image size down
RUN poetry install --no-root --no-interaction --no-ansi

# 7. Copy application code
COPY . .

# 8. Expose port for streamlit
EXPOSE 8501

# 9. Command to run the app
# The command is overridden in docker-compose.yml for development,
# but this serves as a good default.
CMD ["streamlit", "run", "ui_poc.py"] 