Skip to content

Commit

Permalink
Merge pull request opendatahub-io#234 from dibryant/fix
Browse files Browse the repository at this point in the history
Allow runtime script to cp the package from bin to Rpackage default path
  • Loading branch information
harshad16 authored May 10, 2024
2 parents ce98720 + ed3789b commit fa2d2a6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rstudio/rhel9-python-3.9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ RUN chmod -R a+w /usr/lib64/R/library
ENV LIBLOC /usr/lib64/R/library

# set User R Library path
RUN mkdir -p /opt/app-root/src/Rpackages/4.3 && chmod -R a+w /opt/app-root/src/Rpackages/4.3
ENV R_LIBS_USER /opt/app-root/src/Rpackages/4.3
RUN mkdir -p /opt/app-root/bin/Rpackages/4.3 && chmod -R a+w /opt/app-root/bin/Rpackages/4.3
ENV R_LIBS_USER /opt/app-root/bin/Rpackages/4.3

WORKDIR /tmp/

Expand Down
7 changes: 7 additions & 0 deletions rstudio/rhel9-python-3.9/run-rstudio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ fi

# Create lib folders if it does not exist
mkdir -p /opt/app-root/src/Rpackages/4.3
for package in /opt/app-root/bin/Rpackages/4.3/*/;
do
package_folder=$(basename "$package")
if [ ! -d "/opt/app-root/src/Rpackages/4.3/$package_folder" ]; then
cp -r /opt/app-root/bin/Rpackages/4.3/$package_folder /opt/app-root/src/Rpackages/4.3/
fi
done

# rstudio terminal cant see environment variables set by the container runtime
# (which breaks kubectl, to fix this we store the KUBERNETES_* env vars in Renviron.site)
Expand Down

0 comments on commit fa2d2a6

Please sign in to comment.