ml-tooling / ml-workspace

🛠 All-in-one web-based IDE specialized for machine learning and data science.
https://mltooling.org/ml-workspace
Apache License 2.0
3.42k stars 446 forks source link

Update for the R flavor #96

Closed wilsongis closed 2 years ago

wilsongis commented 3 years ago

Feature description:

I am interested in updating the R version of the container. It does not look like R is a branch so I am not sure what I need to do to make the update happen.

Problem and motivation:

I am using the container extensively and I would like an update to the R version

Is this something you're interested in working on?

Yes

lukasmasuch commented 3 years ago

@wilsongis Thanks for your interest! Unfortunately, I have removed the R-flavor in the latest version (0.13). The reason is that the newer versions of RStudio Server have some unresolved problems, making it complicated to update the R-Tooling. However, if there is interest, I might bring it back and try to figure out a way to deal with the RStudio Problem. It would help for deciding the next steps if you could answer the following questions:

Btw. you can find the r-flavor resources of the 0.12.1 version here: https://github.com/ml-tooling/ml-workspace/tree/v0.12.1/r-flavor

wilsongis commented 3 years ago

I appreciate the reply. In looking at my issue, I realized that I can just use the vanilla version. I just needed to install R so that I could use it in a Jupyter Notebook. Again, I appreciate your work.

Thanks, Mike

From: Lukas Masuch @.> Date: Tuesday, July 6, 2021 at 8:41 AM To: ml-tooling/ml-workspace @.> Cc: Mike Wilson @.>, Mention @.> Subject: Re: [ml-tooling/ml-workspace] Update for the R flavor (#96)

@wilsongishttps://github.com/wilsongis Thanks for your interest! Unfortunately, I have removed the R-flavor in the latest version (0.13). The reason is that the newer versions of RStudio Server have some unresolved problems, making it complicated to update the R-Tooling. However, if there is interest, I might bring it back and try to figure out a way to deal with the RStudio Problem. It would help for deciding the next steps if you could answer the following questions:

Btw. you can find the r-flavor resources of the 0.12.1 version here: https://github.com/ml-tooling/ml-workspace/tree/v0.12.1/r-flavor

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/ml-tooling/ml-workspace/issues/96#issuecomment-874770824, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AARMKMNQ6RSYE4VU42C6T4TTWMBZ5ANCNFSM474SLSYQ.

Someone894 commented 3 years ago

Since I need CUDA, R and R-StudioServer on my image I used the 0.12.1 CUDA-version (mltooling/ml-workspace-gpu) with an selfmade script to install the R-dependencies which always felt kinda whaky. As @LukasMasuch pointed out I can't seem to make the same script working under the new 0.13.2.

So in conclusion: I have interest in an ml-learning image with R/R-Studio and CUDA and I really love your work here. Your ml-tool is a really great idea and I hope you keep improving it :-) I use it quite extensively.

For reference here is the script:

#Set all rights to everyone on /tmp, otherwise the apt-get update runs into trouble:
chmod 1777 /tmp

# Fix bad permissions on the /usr folder
#chown -R root:root /usr # bad since netdata does not work
find /usr -uid 4011 -exec chown root:root {} +

#Add certs:
sudo update-ca-certificates

#Add the key and repo for r-base:
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/'

#Add the key for the MS SQL-Server driver:
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
curl https://packages.microsoft.com/config/ubuntu/18.04/prod.list > /etc/apt/sources.list.d/mssql-release.list

#Install r,
#        r-devel (to be able to install source pakages),
#        a curl dependency,
#        a DB driver dependency,
#        a R-Studio-Server dependency:
apt-get update
apt-get install \
  r-base=4.0.5-1.1804.0 \
  r-base-dev=4.0.5-1.1804.0 \
  r-recommended=4.0.5-1.1804.0 \
  r-base-core=4.0.5-1.1804.0 \
  libcurl4-openssl-dev \
  unixodbc-dev \
  libclang-dev \

#Install MS SQL-Server driver:
ACCEPT_EULA=Y apt-get install msodbcsql17 mssql-tools
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc

#Download and install RStudio-Desktop:
#wget -nc --no-check-certificate https://download1.rstudio.org/desktop/bionic/amd64/rstudio-1.4.1103-amd64.deb
#gdebi -n rstudio-1.4.1103-amd64.deb
#rm rstudio-1.4.1103-amd64.deb

#Download and install R studio server:
# Other possible URLs, be carefull 1.3 and 1.4 seems to be buggy:
#https://download2.rstudio.org/server/bionic/amd64/rstudio-server-1.4.1717-amd64.deb
wget -nc --no-check-certificate https://download2.rstudio.org/server/bionic/amd64/rstudio-server-1.2.5042-amd64.deb
gdebi -n rstudio-server-1.2.5042-amd64.deb
rm rstudio-server-1.2.5042-amd64.deb

#Add a rstudio user to run the server application:
useradd -m -d /home/rstudio rstudio
usermod -aG sudo rstudio
echo "rstudio ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers

# Setup R-Studio-Server config:
printf 'rsession-ld-library-path="/usr/local/lib/R/site-library/"' > /etc/rstudio/rserver.conf
printf "session-default-working-dir="$WORKSPACE_HOME"\nsession-default-new-project-dir="$WORKSPACE_HOME > /etc/rstudio/rsession.conf
printf "setwd ('"$WORKSPACE_HOME"')" > /home/rstudio/.Rprofile

# Create an new entry in the tools list:
echo '{"id": "rstudio-link", "name": "RStudio", "url_path": "/tools/8071/", "description": "Development environment for R"}' > $HOME/.workspace/tools/rstudio-server.json

# Download the supervisor config script to restart the R-Studio-Server after every reboot:
wget -nc --no-check-certificate https://raw.githubusercontent.com/ml-tooling/ml-workspace/main/r-flavor/resources/rstudio-service.conf -O /etc/supervisor/conf.d/rstudio-service.conf

# Start the R-Studio-Server:
LD_LIBRARY_PATH="" LD_PRELOAD="" USER=rstudio /usr/lib/rstudio-server/bin/rserver --server-working-dir=$WORKSPACE_HOME --server-daemonize=0 --auth-none=1 --auth-validate-users=0 --www-port 8071 &

As it turns out the https://raw.githubusercontent.com/ml-tooling/ml-workspace/main/r-flavor/resources/rstudio-service.conf file is 404, i need to find a replacement for it.

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 14 days