diff --git a/Dockerfile b/Dockerfile index f2a54185bf..c13d49c6d0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,22 @@ # See LICENSE in the project root for license information. #--------------------------------------------------------------------------------------------- +ARG PYTHON_VERSION="3.11" +FROM python:${PYTHON_VERSION} as builder + +WORKDIR /wheels + +RUN pip install --upgrade pip \ + && pip install wheel + +COPY . . + +RUN mkdir /wheels + +COPY ./recommended-plugins.txt ./recommended-plugins.txt + +RUN pip wheel .[recommended-plugins] --wheel-dir=/wheels + FROM ape:latest-slim USER root diff --git a/Dockerfile.slim b/Dockerfile.slim index 71451dcf3d..02f3627132 100644 --- a/Dockerfile.slim +++ b/Dockerfile.slim @@ -15,12 +15,6 @@ COPY . . RUN pip wheel . -RUN mkdir /wheels/recommended_plugins - -COPY ./recommended-plugins.txt ./recommended-plugins.txt - -RUN pip wheel .[recommended-plugins] --wheel-dir=/wheels/recommended_plugins - FROM python:${PYTHON_VERSION}-slim # See http://label-schema.org for metadata schema @@ -40,7 +34,6 @@ COPY --from=builder /wheels/*.whl /wheels/ RUN pip install --upgrade pip RUN pip install /wheels/*.whl -COPY --from=builder /wheels/recommended_plugins/*.whl /wheels/ RUN ape --version WORKDIR /home/harambe/project