# This file is automatically generated by pipeline-ai and should not be changed by hand.
FROM python:{python_version}-slim

WORKDIR /app

RUN apt update -y
RUN pip install --no-cache-dir -U pip setuptools wheel

# Install serving packages
RUN pip install --no-cache-dir -U fastapi==0.105.0 uvicorn==0.25.0 \
    python-multipart==0.0.6 loguru==0.7.2

# Container commands
{container_commands}

# Install python dependencies
RUN pip install --no-cache-dir {python_requirements}

# Copy in files
COPY ./ ./

FROM scratch
COPY --from=0 / /

WORKDIR /app

ENV PYTHONUNBUFFERED=1
ENV PIPELINE_PATH={pipeline_path}
ENV PIPELINE_NAME={pipeline_name}
ENV PIPELINE_IMAGE={pipeline_image}

CMD ["uvicorn", "pipeline.container.startup:create_app", "--host", "0.0.0.0", "--port", "14300"]
