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

Initial Kubeflow support #91

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions scripts/install_rstudio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,15 @@ echo "lock-type=advisory" > /etc/rstudio/file-locks
cp /etc/rstudio/rserver.conf /etc/rstudio/disable_auth_rserver.conf
echo "auth-none=1" >> /etc/rstudio/disable_auth_rserver.conf

## Prepare optional configuration file to disable authentication
## and set variables for Kubeflow
## To set variables, `kubeflow_rserver.conf` script
## will just need to be overwrite /etc/rstudio/rserver.conf.
## This is triggered when NB_PREFIX is set by Kubeflow
cp /etc/rstudio/rserver.conf /etc/rstudio/kubeflow_rserver.conf
echo "auth-none=1" >> /etc/rstudio/kubeflow_rserver.conf
echo "www-port=8888" >> /etc/rstudio/kubeflow_rserver.conf

## Set up RStudio init scripts
mkdir -p /etc/services.d/rstudio
# shellcheck disable=SC2016
Expand Down
10 changes: 10 additions & 0 deletions scripts/userconf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ then
echo "USER=$USER" >> /etc/environment
fi


if [[ ${NB_PREFIX,,} != "" ]]
## Kubeflow configuration, https://github.com/rocker-org/rocker-versioned2/pull/91
then
echo "www-root-path=${NB_PREFIX}" >> /etc/rstudio/kubeflow_rserver.conf
mv /etc/rstudio/kubeflow_rserver.conf /etc/rstudio/rserver.conf
echo "USER=$USER" >> /etc/environment
fi


if grep --quiet "auth-none=1" /etc/rstudio/rserver.conf
then
echo "Skipping authentication as requested"
Expand Down