Kaggle / docker-rstats

Kaggle R docker image
Apache License 2.0
144 stars 90 forks source link

Fix gpu by changing the path set by R #114

Closed Philmod closed 4 years ago

Philmod commented 4 years ago

This is hopefully a temporary solution.

Original ldpaths file content:

: ${JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64}
: ${R_JAVA_LD_LIBRARY_PATH=${JAVA_HOME}/lib/server}
if test -n "/usr/local/lib:/usr/lib/x86_64-linux-gnu"; then
: ${R_LD_LIBRARY_PATH=${R_HOME}/lib:/usr/local/lib:/usr/lib/x86_64-linux-gnu}
else
: ${R_LD_LIBRARY_PATH=${R_HOME}/lib}
fi
if test -n "${R_JAVA_LD_LIBRARY_PATH}"; then
  R_LD_LIBRARY_PATH="${R_LD_LIBRARY_PATH}:${R_JAVA_LD_LIBRARY_PATH}"
fi
## This is DYLD_FALLBACK_LIBRARY_PATH on Darwin (macOS) and
## LD_LIBRARY_PATH elsewhere.
## However, on macOS >=10.11 (if SIP is enabled, the default), the
## environment value will not be passed to a script such as R.sh, so
## would not seen here.
if test -z "${LD_LIBRARY_PATH}"; then
  LD_LIBRARY_PATH="${R_LD_LIBRARY_PATH}"
else
  LD_LIBRARY_PATH="${R_LD_LIBRARY_PATH}:${LD_LIBRARY_PATH}"
fi
export LD_LIBRARY_PATH

Instead of setting /usr/lib/x86_64-linux-gnu in front of the path, it's moved at the end.

Philmod commented 4 years ago

Tested successfully.

CqRJktxzEeZ