Skip to content

Run rstudio-server in conda environment with singularity installed

Notifications You must be signed in to change notification settings

zhangjy859/rstudio-server-conda-singularity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

rstudio-server-conda-singularity

Run rstudio-server in conda environment with singularity installed

Acknowledgements

I adopted script from @grst's project rstudio-server-conda (https://github.com/grst/rstudio-server-conda)

This script use @rocker's rstudio singularity img (https://github.com/rocker-org/rocker)

install

install singularity

with root privilege

https://docs.sylabs.io/guides/3.0/user-guide/installation.html

without root privilege

https://docs.sylabs.io/guides/3.5/admin-guide/installation.html#install-nonsetuid

also see: https://blog.csdn.net/lazysnake666/article/details/122834329 (Chinese)

run this script

  1. clone this project and cd to project directory

  2. activate conda environment you want conda activate env_name

  3. run script

WORKDIRECTORY="/path/to/your/rproject/workdir/" PORT=8787 PASSWORD=PASSWORD ./run_singularity.sh #change the port number if your port is already occupied (for example, another rstudio server is running)

Your r project directory will mount on '/data' in rstudio server

  1. visit http://your_server_ip:8787

Note: if your server is under a firewall, I recommend using SSH port forwarding.

eg:

# keep this ssh connect running throughout the entire session
ssh user_name@your_server_ip -L 8787:127.0.0.1:8787

visit http://127.0.0.1:8787

About

Run rstudio-server in conda environment with singularity installed

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages