diff --git a/Dockerfile.ubuntu b/Dockerfile.ubuntu index b9069ea10d..281431ac5b 100644 --- a/Dockerfile.ubuntu +++ b/Dockerfile.ubuntu @@ -123,7 +123,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ apt-get clean && \ rm -rf /var/lib/apt/lists/* && \ python3 -m pip install "numpy<2.0.0" --no-cache-dir && \ - python3 -m pip install "Jinja2==3.1.4" "MarkupSafe==3.0.2" --no-cache-dir + python3 -m pip install "Jinja2==3.1.4" "MarkupSafe" --no-cache-dir RUN apt-get update; apt-get install -y --no-install-recommends libxml2 && rm -rf /var/lib/apt/lists/* && rm -rf /tmp/* @@ -376,6 +376,7 @@ COPY MakefileCapi /ovms/ RUN if [ "$FUZZER_BUILD" == "0" ]; then CAPI_FLAGS=${CAPI_FLAGS} make -f MakefileCapi cpp && \ CAPI_FLAGS=${CAPI_FLAGS} make -f MakefileCapi c; fi ; RUN mkdir -p /ovms_release/lib/ ; find /ovms/bazel-out/k8-*/bin -iname 'libovms_shared.so' -exec cp -v {} /ovms_release/lib/ \; + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # FROM build as pkg @@ -401,6 +402,11 @@ RUN chown -R ovms:ovms /ovms_release && \ # Remove capi library RUN if [ -f /ovms_release/lib/libovms_shared.so ] ; then mv /ovms_release/lib/libovms_shared.so / ; fi ; +RUN mkdir /ovms_release/python_deps && \ + cp -R /usr/local/lib/python3*/dist-packages/jinja2* /ovms_release/python_deps/ && \ + cp -R /usr/local/lib/python3*/dist-packages/MarkupSafe* /ovms_release/python_deps/ && \ + cp -R /usr/local/lib/python3*/dist-packages/markupsafe /ovms_release/python_deps/ + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # FROM $BASE_IMAGE as release @@ -453,10 +459,8 @@ RUN if [ "$NVIDIA" == "1" ]; then true ; else exit 0 ; fi ; echo "installing cud apt-get clean && rm -rf /var/lib/apt/lists/* && rm -rf /tmp/* COPY --from=pkg /ovms_release /ovms -COPY --from=build /usr/local/lib/python3.*/dist-packages/MarkupSafe-3.0.2.dist-info /ovms/python_deps/MarkupSafe-3.0.2.dist-info -COPY --from=build /usr/local/lib/python3.*/dist-packages/jinja2 /ovms/python_deps/jinja2 -COPY --from=build /usr/local/lib/python3.*/dist-packages/jinja2-3.1.4.dist-info /ovms/python_deps/jinja2-3.1.4.dist-info -COPY --from=build /usr/local/lib/python3.*/dist-packages/markupsafe /ovms/python_deps/markupsafe +COPY --from=pkg /ovms_release/python_deps /ovms/python_deps/ + # For image with Python enabled install Python library RUN if ! [[ $debug_bazel_flags == *"py_off"* ]]; then true ; else exit 0 ; fi ; \