Skip to content

Commit

Permalink
Update for Ubuntu 24.04
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
pjonsson committed Dec 2, 2024
1 parent f26f05b commit 0e63afc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 3 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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" && \
Expand All @@ -56,10 +56,8 @@ RUN echo "building FORCE" && \

FROM davidfrantz/base:latest 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

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
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0e63afc

Please sign in to comment.