Conda R-Studio Server

Dear all,
I want to run R-Studio-Server with the R session inside my conda environment thats why I configured my /etc/rstudio/rserver.conf the following

rsession-which-r=/opt/conda/envs/ngs_py36/bin/R
rsession-ld-library-path=/opt/conda/envs/ngs_py36/lib

I want to configure my PATH variable like
Sys.setenv("PATH=/opt/conda/envs/ngs_py36/lib")

I learned that I can configure PATH variable within the .Renviron, but how can I make RStudio-Server to automatically pick up PATH variable for the current user ?

Thanks for the help!

1 Like

You can define your PATH in your startup file for rstudio-server, this varies depending on the OS, but for example on debian it's located here /etc/init.d/rstudio-server

#! /bin/sh
### BEGIN INIT INFO
# Provides:          rstudio-server
# Required-Start:    $remote_fs
# Required-Stop:     $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: RStudio Server
# Description:       RStudio Server provides a web interface to R
### END INIT INFO

# Author: RStudio <info@rstudio.com>
#

# Do NOT "set -e"

# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/usr/local/bin/:/sbin:/usr/sbin:/bin:/usr/bin
DESC="RStudio Server"
NAME=rserver
PID_FILE=/var/run/rstudio-server.pid
DAEMON=/usr/local/lib/rstudio-server/bin/rserver
SCRIPTNAME=/etc/init.d/rstudio-server

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.