Skip to content

Commit 730198a

Browse files
committed
Update for Ubuntu 24.04
Switch the Dockerfile to using the ubuntu user/group which is required for building after davidfrantz/base_image#4 has been merged. Also remove the WORKDIR since that is the last thing set by the Dockerfile for davidfrantz/base. Include paths for some dependencies have changed, so update the Makefile with those paths as well.
1 parent ab7e218 commit 730198a

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Dockerfile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ ARG debug=disable
3939
# Copy src to SOURCE_DIR
4040
RUN mkdir -p $SOURCE_DIR
4141
WORKDIR $SOURCE_DIR
42-
COPY --chown=docker:docker . .
42+
COPY --chown=ubuntu:ubuntu . .
4343

4444
# Build, install, check FORCE
4545
RUN echo "building FORCE" && \
@@ -56,10 +56,8 @@ RUN echo "building FORCE" && \
5656

5757
FROM davidfrantz/base:latest as force
5858

59-
COPY --chown=docker:docker --from=force_builder $HOME/bin $HOME/bin
60-
COPY --chown=docker:docker --from=force_builder $HOME/force-udf $HOME/udf
61-
62-
WORKDIR /home/docker
59+
COPY --chown=ubuntu:ubuntu --from=force_builder $HOME/bin $HOME/bin
60+
COPY --chown=ubuntu:ubuntu --from=force_builder $HOME/force-udf $HOME/udf
6361

6462
ENV R_HOME=/usr/lib/R
6563
ENV LD_LIBRARY_PATH=$R_HOME/lib

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,13 @@ CURL_INCLUDES = -I/usr/include/curl -I/usr/include/x86_64-linux-gnu/curl
4040
CURL_LIBS = -L/usr/lib/x86_64-linux-gnu -lcurl
4141
CURL_FLAGS = -Wl,-rpath=/usr/lib/x86_64-linux-gnu
4242

43-
OPENCV_INCLUDES = -I/usr/local/include/opencv4
43+
OPENCV_INCLUDES = -I/usr/include/opencv4
4444
OPENCV_LIBS = -L/usr/local/lib -lopencv_core -lopencv_ml -lopencv_imgproc
4545
OPENCV_FLAGS = -Wl,-rpath=/usr/local/lib
4646

47-
PYTHON_INCLUDES = $(shell python3-config --includes)
47+
NUMPY_INCLUDE_PATH := $(shell python3 -c "import numpy; print(numpy.get_include())")
48+
49+
PYTHON_INCLUDES = $(shell python3-config --includes) -I$(NUMPY_INCLUDE_PATH)
4850
PYTHON_LIBS = $(shell (python3-config --ldflags --libs --embed || python3-config --ldflags --libs) | tr -d '\n')
4951

5052
RSTATS_INCLUDES = $(shell R CMD config --cppflags)

0 commit comments

Comments
 (0)