diff --git a/Dockerfile b/Dockerfile index eb656677..174bd057 100755 --- a/Dockerfile +++ b/Dockerfile @@ -27,7 +27,7 @@ # base installation to speed up build process # https://github.com/davidfrantz/base_image -FROM davidfrantz/base:latest as force_builder +FROM davidfrantz/base:ubuntu24 AS force_builder # Environment variables ENV SOURCE_DIR $HOME/src/force @@ -39,7 +39,7 @@ ARG debug=disable # Copy src to SOURCE_DIR RUN mkdir -p $SOURCE_DIR WORKDIR $SOURCE_DIR -COPY --chown=docker:docker . . +COPY --chown=ubuntu:ubuntu . . # Build, install, check FORCE RUN echo "building FORCE" && \ @@ -54,12 +54,13 @@ RUN echo "building FORCE" && \ # clone FORCE UDF git clone https://github.com/davidfrantz/force-udf.git -FROM davidfrantz/base:latest as force +FROM davidfrantz/base:ubuntu24 AS force -COPY --chown=docker:docker --from=force_builder $HOME/bin $HOME/bin -COPY --chown=docker:docker --from=force_builder $HOME/force-udf $HOME/udf +# FIXME: workaround to make CI tests (that run as uid < 1000) pass. +RUN chmod 777 /home/ubuntu -WORKDIR /home/docker +COPY --chown=ubuntu:ubuntu --from=force_builder $HOME/bin $HOME/bin +COPY --chown=ubuntu:ubuntu --from=force_builder $HOME/force-udf $HOME/udf ENV R_HOME=/usr/lib/R ENV LD_LIBRARY_PATH=$R_HOME/lib diff --git a/Makefile b/Makefile index 751839a7..fe299097 100755 --- a/Makefile +++ b/Makefile @@ -40,11 +40,13 @@ CURL_INCLUDES = -I/usr/include/curl -I/usr/include/x86_64-linux-gnu/curl CURL_LIBS = -L/usr/lib/x86_64-linux-gnu -lcurl CURL_FLAGS = -Wl,-rpath=/usr/lib/x86_64-linux-gnu -OPENCV_INCLUDES = -I/usr/local/include/opencv4 +OPENCV_INCLUDES = -I/usr/include/opencv4 OPENCV_LIBS = -L/usr/local/lib -lopencv_core -lopencv_ml -lopencv_imgproc OPENCV_FLAGS = -Wl,-rpath=/usr/local/lib -PYTHON_INCLUDES = $(shell python3-config --includes) +NUMPY_INCLUDE_PATH := $(shell python3 -c "import numpy; print(numpy.get_include())") + +PYTHON_INCLUDES = $(shell python3-config --includes) -I$(NUMPY_INCLUDE_PATH) PYTHON_LIBS = $(shell (python3-config --ldflags --libs --embed || python3-config --ldflags --libs) | tr -d '\n') RSTATS_INCLUDES = $(shell R CMD config --cppflags)