Skip to content

Commit ba1da84

Browse files
committed
update: simplify r-base kernel support
1 parent ea13b7b commit ba1da84

File tree

3 files changed

+7
-22
lines changed

3 files changed

+7
-22
lines changed

r-base/Dockerfile.4.0.4

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ RUN jupyter nbextensions_configurator enable && \
9292
jupyter lab build
9393

9494
COPY ./service-defs /etc/backend.ai/service-defs
95-
RUN rm /etc/backend.ai/service-defs/rstudio.json
9695
COPY bootstrap_rocker2.sh /opt/container/bootstrap.sh
9796
COPY userconf_backendai.sh /rocker_scripts/userconf.sh
9897
COPY userconf_backendai.sh /etc/cont-init.d/userconf

r-base/service-defs/rstudio.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"command": [
3+
"/usr/lib/rstudio-server/bin/rserver"
4+
]
5+
}

r-base/userconf_backendai.sh

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ bold=$(tput bold)
1515
normal=$(tput sgr0)
1616

1717
if [[ ${DISABLE_AUTH,,} == "true" ]]
18-
1918
then
2019
mv /etc/rstudio/disable_auth_rserver.conf /etc/rstudio/rserver.conf
2120
echo "USER=$USER" >> /etc/environment
@@ -49,23 +48,8 @@ if [ "$USERID" -lt 1000 ]
4948
fi
5049
fi
5150

52-
if [ "$USERID" -ne 1000 ]
53-
## Configure user with a different USERID if requested.
54-
then
55-
echo "deleting user rstudio"
56-
userdel rstudio
57-
usermod -a -G staff $USER
58-
elif [ "$USER" != "rstudio" ]
59-
then
60-
## cannot move home folder when it's a shared volume, have to copy and change permissions instead
61-
cp -r /home/rstudio /home/$USER
62-
## RENAME the user
63-
usermod -l $USER -d /home/$USER rstudio
64-
groupmod -n $USER rstudio
65-
usermod -a -G staff $USER
66-
chown -R $USER:$USER /home/$USER
67-
echo "USER is now $USER"
68-
fi
51+
#userdel rstudio
52+
usermod -a -G staff $USER
6953

7054
if [ "$GROUPID" -ne 1000 ]
7155
## Configure the primary GID (whether rstudio or $USER) with a different GROUPID if requested.
@@ -75,9 +59,6 @@ if [ "$GROUPID" -ne 1000 ]
7559
echo "Primary group ID is now custom_group $GROUPID"
7660
fi
7761

78-
## Add a password to user
79-
echo "$USER:$PASSWORD" | chpasswd
80-
8162
# Use Env flag to know if user should be added to sudoers
8263
if [[ ${ROOT,,} == "true" ]]
8364
then

0 commit comments

Comments
 (0)