FROM python:3.8.13 AS base | |
ENV PYTHONPATH=$PYTHONPATH:/src/ | |
ADD requirements.txt . | |
RUN pip3 install -r requirements.txt | |
ENV PYTHONPATH=$PYTHONPATH:/src/ | |
# π Uncomment for DEPLOY / Comment for DevContainers | |
COPY ./ /src/ | |
WORKDIR /src | |
FROM base AS test | |
RUN ["pytest", "-v", "/src/tests"] | |
FROM base AS build | |
ENTRYPOINT ["python3", "/src/ml_service.py"] | |