Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARROW-3366: [R] Dockerfile for docker-compose setup #2770

Closed
wants to merge 13 commits into from
Prev Previous commit
Next Next commit
more changes
  • Loading branch information
jameslamb committed Nov 17, 2018
commit 343456afa3d7916a3b0b3d89ebfee409d59502a9
1 change: 1 addition & 0 deletions ci/docker_build_r.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export PKG_CXXFLAGS=$CXXFLAGS
# Build arrow
pushd /arrow/r

rm src/RcppExports*
Rscript -e "Rcpp::compileAttributes()"
R CMD build --keep-empty-dirs .
R CMD INSTALL $(ls | grep arrow_*.tar.gz)
Expand Down
16 changes: 14 additions & 2 deletions r/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,16 @@ RUN apt update && \
apt install -y \
libgit2-dev \
libssl-dev && \
# install clang to mirror what was done on Travis
apt install -y\
clang \
clang-format \
clang-tidy && \
# Install vctrs from Github
Rscript -e "install.packages('devtools', repos = 'http://cran.rstudio.com')" && \
Rscript -e "devtools::install_github('r-lib/vctrs')" && \
Rscript -e "devtools::install_github('romainfrancois/vctrs@bit64')" && \
Rscript -e "devtools::install_github('r-lib/withr')" && \
Rscript -e "devtools::install_github('RcppCore/Rcpp')" && \
# R is not good at picking up dependencies and installing them automatically
Rscript -e "install.packages(c( \
'Rcpp', \
Expand All @@ -52,12 +59,17 @@ RUN apt update && \
'tibble', \
'crayon', \
'testthat', \
'bit64'), \
'bit64', \
'hms', \
'lubridate'), \
repos = 'http://cran.rstudio.com')"

# Tell R where it can find the source code for arrow
ENV PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/build/cpp/src/arrow
ENV LD_LIBRARY_PATH=/opt/conda/lib/:/build/cpp/src/arrow:/arrow/r/src
env CXXFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0"

#export BUILD_DIR=/build/cpp-install

# build, install, test R package
CMD /arrow/ci/docker_build_cpp.sh && \
Expand Down
1 change: 1 addition & 0 deletions r/src/Makevars.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ PKG_CPPFLAGS=@cflags@
PKG_CXXFLAGS+=$(C_VISIBILITY)
jameslamb marked this conversation as resolved.
Show resolved Hide resolved
CXX_STD=CXX11
PKG_LIBS=@libs@ -Wl,-rpath,/usr/local/lib
#CXXFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0"