Rstudio – FASRC DOCS https://docs.rc.fas.harvard.edu Wed, 08 Jan 2025 03:54:45 +0000 en-US hourly 1 https://wordpress.org/?v=6.7.1 https://docs.rc.fas.harvard.edu/wp-content/uploads/2018/08/fasrc_64x64.png Rstudio – FASRC DOCS https://docs.rc.fas.harvard.edu 32 32 172380571 R and RStudio on the FASRC clusters https://docs.rc.fas.harvard.edu/kb/r-and-rstudio/ Fri, 07 Jun 2024 20:46:42 +0000 https://docs.rc.fas.harvard.edu/?post_type=epkb_post_type_1&p=27082

What is R?

R is a language and environment for statistical computing and graphics. It is a GNU project which is similar to the S language and environment which was developed at Bell Laboratories (formerly AT&T, now Lucent Technologies) by John Chambers and colleagues. R can be considered as a different implementation of S. There are some important differences, but much code written for S runs unaltered under R.

There are several options to use R on the FASRC clusters:

We recommend using RStudio Server on Open OnDemand because it is the simplest way to install R packages (see RStudio Server). We only recommend R module and RStudio Desktop if:

  • plan to run mpi/multi-node jobs
  • need to choose specific compilers for R package installation
  • you are an experienced user and know how to install software

RStudio Server

RStudio Server is our go-to RStudio app because it contains a wide range of precompiled R packages from bioconductor and rocker/tidyverse. This means that installing R packages in RStudio Server is pretty straightforward. Most times, it will be sufficient to simply:

> install.packages("package_name")

This simplicity was possible because RStudio Server runs inside a Singularity container, meaning that it does not use the host operating system (OS). For more information on Singularity, refer to our Singularity on the cluster docs.

Important notes:

  • User-installed R libraries will be installed in ~/R/ifxrstudio/\<IMAGE_TAG\>
  • This app contains many pre-compiled packages from bioconductor and rocker/tidyverse.
  • FAS RC environment modules (e.g. module load) and Slurm (e.g. sbatch) are not accessible from this app.
  • For the RStudio with environment module and Slurm support, see RStudio Desktop

This app is useful for most applications, including multi-core jobs. However, it is not suitable for multi-node jobs. For multi-node jobs, the recommended app is RStudio Desktop.


FASSE cluster additional settings

If you are using FASSE Open OnDemand and need to install R packages in RStudio Server, you will likely need to set the proxies as explained in our Proxy Settings documentation. Before installing packages, execute these two commands in RStudio Server:

> Sys.setenv(http_proxy="http://rcproxy.rc.fas.harvard.edu:3128")
> Sys.setenv(https_proxy="http://rcproxy.rc.fas.harvard.edu:3128")

Package Seurat

In RStudio Server Release 3.18, the default version for umap-learn is 0.5.5. However, this version contains a bug. To resolve this issue, downgrade to umap-learn version 0.5.4:

> install.packages("Seurat")
> reticulate::py_install(packages = c("umap-learn==0.5.4","numpy<2"))

And test with

> library(Seurat)
> data("pbmc_small")
> pbmc_small <- RunUMAP(object = pbmc_small, dims = 1:5, metric='correlation', umap.method='umap-learn')
UMAP(angular_rp_forest=True, local_connectivity=1, metric='correlation', min_dist=0.3, n_neighbors=30, random_state=RandomState(MT19937) at 0x14F205B9E240, verbose=True)
Wed Jul 3 17:22:55 2024 Construct fuzzy simplicial set
Wed Jul 3 17:22:56 2024 Finding Nearest Neighbors
Wed Jul 3 17:22:58 2024 Finished Nearest Neighbor Search
Wed Jul 3 17:23:00 2024 Construct embedding
Epochs completed: 100%| ██████████ 500/500 [00:00]
Wed Jul 3 17:23:01 2024 Finished embedding

R, CRAN, and RStudio Server pinned versions

To ensure R packages compatibility, R, CRAN, and RStudio Server versions are pinned to a specific date. For more details see Rocker project which is the base image for FASRC’s RStudio Server.

Use R packages from RStudio Server in a batch job

The RStudio Server OOD app hosted on Cannon at rcood.rc.fas.harvard.edu and FASSE at fasseood.rc.fas.harvard.edu runs RStudio Server in a Singularity container (see Singularity on the cluster). The path to the Singularity image on both Cannon and FASSE clusters is the same:

/n/singularity_images/informatics/ifxrstudio/ifxrstudio:RELEASE_<VERSION>.sif

Where <VERSION> corresponds to the Bioconductor version listed in the “R version” dropdown menu. For example:

R 4.2.3 (Bioconductor 3.16, RStudio 2023.03.0)

uses the Singularity image:

/n/singularity_images/informatics/ifxrstudio/ifxrstudio:RELEASE_3_16.sif

As mentioned above, when using the RStudio Server OOD app, user-installed R packages by default go in:

~/R/ifxrstudio/RELEASE_<VERSION>

This is an example of a batch script named runscript.sh that executes R script myscript.R inside the Singularity container RELEASE_3_16:

#!/bin/bash
#SBATCH -c 1 # Number of cores (-c)
#SBATCH -t 0-01:00 # Runtime in D-HH:MM
#SBATCH -p test # Partition to submit to
#SBATCH --mem=1G # Memory pool for all cores (see also --mem-per-cpu)
#SBATCH -o myoutput_%j.out # File to which STDOUT will be written, %j inserts jobid
#SBATCH -e myerrors_%j.err # File to which STDERR will be written, %j inserts jobid

# set R packages and rstudio server singularity image locations
my_packages=${HOME}/R/ifxrstudio/RELEASE_3_16
rstudio_singularity_image="/n/singularity_images/informatics/ifxrstudio/ifxrstudio:RELEASE_3_16.sif"

# run myscript.R using RStudio Server signularity image
singularity exec --cleanenv --env R_LIBS_USER=${my_packages} ${rstudio_singularity_image} Rscript myscript.R

To submit the job, execute the command:

sbatch runscript.sh

Advanced Users

These options are for users familiar with software installation from source, where you choose compilers and set your environmental variables. If you are not familiar with these concepts, we highly recommend using RStudio Server instead.

R module

To use R module, ou should first have taken our Introduction to the FASRC training and be familiar with running jobs on the cluster. R modules come with some basic R packages. If you use a module, you will likely have to install most of the R packages that you need.

To use R on the FASRC clusters, load R via our module system. For example, this command will load the latest R version:

module load R

If you need a specific version of R, you can search with the command

module spider R

To load a specific version

module load R/4.2.2-fasrc01

For more information on modules, see the Lmod Modules page.

To use R from the command line, you can use an R shell for interactive work. For batch jobs, you can use R CMD BATCH and RScript commands. Note that these commands have different behaviors:

  • R CMD BATCH
    • output will be directed to a .Rout file unless you specify otherwise
    • prints out input statements
    • cannot output to STDOUT
  • RScript
    • output and errors are directed to to STDOUT and STDERR, respectively, as many other programs
    • does not print input statements

For slurm batch examples, refer to FASRC User_Codes Github repository:

Examples and details of how to run R from the command line can be found at:

R Module + RStudio Desktop

RStudio Desktop depends on an R module. Although it has some precompiled R packages that comes with the R module, it is a much more limited list than the RStudio Server app.

RStudio Desktop runs on the host operating system (OS), the same environment as when you ssh to Cannon or FASSE.

This app is particularly useful to run multi-node/mpi applications because the you can specify the exact modules, compilers, and packages that you need to load.

See how to launch RStudio Desktop documentaiton.

R in Jupyter

To use R in Jupyter, you will need to create a conda/mamba virtual environment and install packages jupyter and rpy2 , which will allow you to use R in Jupyter.

Step 1:  Request an interactive job

salloc --partition test --time 02:00:00 --ntasks=1 --mem 10000

Step 2: Load python module, set environmental variables, and create an environment with the necessary packages:

module load python/3.10.13-fasrc01
export PYTHONNOUSERSITE=yes
mamba create -n rpy2_env jupyter numpy matplotlib pandas scikit-learn scipy rpy2 r-ggplot2 -c conda-forge -y

See Python instructions for more details on Python and mamba/conda environments.

After creating the mamba/conda environment, you will need to load that environment by selecting the corresponding kernel on the Jupyter Notebook to start using R in the notebook.

Step 3: Launch the Jupyter app on the OpenOnDemand VDI portal using these instructions.

You may need to load certain modules for package installations. For example, R package lme requires cmake. You can load cmake by adding the module name in the field “Extra Modules”:

Step 4: Open your Jupyter notebook. On the top right corner, click on “Python 3” (typically, it has “Python 3”, but it may be different on your Notebook). Select the created conda environment “Python [conda env:conda-rpy2_env]”:

Alternatively, you can use the top menu: Kernel -> Change Kernel -> Python [conda env:conda-rpy2_env]

Step 5: Install R packages using a Jupyter Notebooks

Refer to the example Jupyter Notebook on FASRC User_Codes Github.

R with Spack

Step 1: Install Spack by following our Spack Install and Setup instructions.

Step 2: Install the R packages with Spack from the command line. For all R package installations with Spack, ensure you are in a compute node by requesting an interactive job (if you are already in a interactive job, there is no need to request another interactive job):

[jharvard@holylogin spack]$ salloc --partition test --time 4:00:00 --mem 16G -c 8
Installing R packages with spack is fairly simple. The main steps are:
[jharvard@holy2c02302 spack]$ spack install package_name  # install software
[jharvard@holy2c02302 spack]$ spack load package_name     # load software to your environment
[jharvard@holy2c02302 spack]$ R                           # launch R
> library(package_name)                                   # load package within R
For specific examples, refer to FASRC User_Codes Github repository:

R and RStudio on Windows

See our R and RStudio on Windows page.

Troubleshooting

Files that may configure R package installations

  • ~/.Rprofile
  • ~/.Renviron
  • ~/.bashrc
  • ~/.bash_profile
  • ~/.profile
  • ~/.config/rstudio/rstudio-prefs.json
  • ~/.R/Makevars

References

]]>
27082
RStudio Server vs. RStudio Desktop OOD apps https://docs.rc.fas.harvard.edu/kb/rstudio-server-vs-rstudio-desktop/ Mon, 07 Nov 2022 18:42:56 +0000 https://docs.rc.fas.harvard.edu/?post_type=epkb_post_type_1&p=25794 Disclaimer: The differences presented here are specifically applicable to RStudio in the FASRC Open OnDemand environment and not for the general RStudio Desktop vs. RStudio Server.

FASRC has implemented two different Open OnDemand (OOD, formerly called VDI) applications for RStudio:

  • RStudio Server through the OOD app “RStudio Server”
  • RStudio Desktop through the OOD app “Remote Desktop” then launching RStudio Desktop

In this doc, we attempt to explain the major difference between the two.

RStudio Server

RStudio Server is our go-to RStudio app because it contains a wide range of precompiled R packages from bioconductor and rocker/tidyverse. This means that installing R packages in RStudio Server is pretty straightforward. Most times, it will be sufficient to simply:

> install.packages("package_name")

This simplicity was possible because RStudio Server runs inside a Singularity container, meaning that it does not use the host operating system (OS). For more information on Singularity, refer to our Singularity on the cluster docs.

Important notes:

  • User-installed R libraries will be installed in ~/R/ifxrstudio/\<IMAGE_TAG\>
  • This app contains many pre-compiled packages from bioconductor and rocker/tidyverse.
  • FAS RC environment modules (e.g. module load) and Slurm (e.g. sbatch) are not accessible from this app.
  • For the RStudio with environment module and Slurm support, go to our Open OnDemand page select Interactive Apps > Remote Desktop and refer to Open OnDemand Remote Desktop: How to open software

This app is useful for most applications, including multi-core jobs. However, it is not suitable for multi-node jobs. For multi-node jobs, the recommended app is RStudio Desktop.

Installing R packages in RStudio Server in the FASSE cluster

If you are using FASSE Open OnDemand and need to install R packages in RStudio Server, you will likely need to set the proxies as explained in our Proxy Settings documentation. Before installing packages, execute these two commands in RStudio Server:

> Sys.setenv(http_proxy="http://rcproxy.rc.fas.harvard.edu:3128")
> Sys.setenv(https_proxy="http://rcproxy.rc.fas.harvard.edu:3128")

Running as a batch or interactive job

The RStudio Server OOD app hosted on Cannon at rcood.rc.fas.harvard.edu and FASSE at fasseood.rc.fas.harvard.edu runs RStudio Server in a Singularity container (see Singularity on the cluster). The path to the Singularity image on both Cannon and FASSE clusters is the same:

/n/singularity_images/informatics/ifxrstudio/ifxrstudio:RELEASE_<VERSION>.sif

Where <VERSION> corresponds to the Bioconductor version listed in the “R version” dropdown menu. For example:

R 4.2.3 (Bioconductor 3.16, RStudio 2023.03.0)

uses the Singularity image:

/n/singularity_images/informatics/ifxrstudio/ifxrstudio:RELEASE_3_16.sif

As mentioned above, when using the RStudio Server OOD app, user-installed R packages by default go in:

~/R/ifxrstudio/RELEASE_<VERSION>

Batch job

The command-line invocation in a batch job would be, for example (this will run the R script myscript.R):

This is an example of a batch script named runscript.sh that executes R script myscript.R inside the Singularity container RELEASE_3_16:

#!/bin/bash
#SBATCH -c 1 # Number of cores (-c)
#SBATCH -t 0-01:00 # Runtime in D-HH:MM
#SBATCH -p test # Partition to submit to
#SBATCH --mem=1G # Memory pool for all cores (see also --mem-per-cpu)
#SBATCH -o myoutput_%j.out # File to which STDOUT will be written, %j inserts jobid
#SBATCH -e myerrors_%j.err # File to which STDERR will be written, %j inserts jobid

# set R packages and rstudio server singularity image locations
my_packages=${HOME}/R/ifxrstudio/RELEASE_3_16
rstudio_singularity_image="/n/singularity_images/informatics/ifxrstudio/ifxrstudio:RELEASE_3_16.sif"

# run myscript.R using RStudio Server signularity image
singularity exec --cleanenv --env R_LIBS_USER=${my_packages} ${rstudio_singularity_image} Rscript myscript.R

To submit the job, execute the command:

sbatch runscript.sh

Interactive job

Or to run R interactively (this will launch an R shell that you can interact with) — not applicable to FASSE where interactive jobs are not allowed:

singularity exec --cleanenv --env R_LIBS_USER=$HOME/R/ifxrstudio/RELEASE_3_16 /n/singularity_images/informatics/ifxrstudio/ifxrstudio:RELEASE_3_16.sif R

RStudio Desktop

RStudio Desktop is a “bare” version of RStudio. Although it has some precompiled R packages, it is a much more limited list than the RStudio Server app.

RStudio Desktop runs on the host operating system (OS), the same environment as when you ssh to Cannon or FASSE.

This app is particularly useful to run multi-node applications because the you can specify the exact modules and packages that you need to load

]]>
25794
Virtual Desktop Apps https://docs.rc.fas.harvard.edu/kb/vdi-apps/ Tue, 22 Jan 2019 17:34:15 +0000 https://www.rc.fas.harvard.edu/?page_id=19589 Please remember that to access the VDI dashboard you will need to be logged to the FASRC VPN and have cluster access, which you can request via the FASRC Portal.  The Interactive Apps currently supported on the OpenOnDemand virtual desktop ( https://rcood.rc.fas.harvard.edu ) include:

  • Remote Desktop: This app allows the user to schedule a Remote Desktop job and opens a browser based viewer to connect to it
  • Jupyter notebook: The app schedules a notebook session on one of the compute nodes and opens a connection to it in a new tab.
  • RStudio Server: The app schedules a rstudio server session on one of the compute nodes and opens a connection to it in a new tab.
  • Matlab: The app schedules a rstudio server session on one of the compute nodes and opens a connection to it in a new tab. You can run single-node codes in parallel using the parallel pool. See our Github User_Codes page for an Matlab parallel example on VDI.
  • Other: Additionally, we offer Tensorboard and other applications as they are requested or become available. You will also likely see customized versions of apps for FAS Informatics, CGA, or others. These are available to you but will likely be customized for specific uses unlike the standard versions listed further down.  Please note that the list below may look different depending on your department (example: COMSOL is only available to SEAS).

List of available apps


RCOOD Remote Desktop

The Remote Desktop app will schedule a job on one of the nodes in the dedicated remote desktop partition, start a vnc server (TurboVNC), and provide a link to connect to in via the browser based app noVNC.  No client is needed to connect to it, but if instead of using the web based client you prefer to use a traditional VNC client to connect to your session, please see Using a VNC Client to Connect at the bottom of this page.  To launch the session, please select the “Remote Desktop” entry from the “Interactive Apps” menu, and fill in the following form. In the form you will be able to select:

– the memory allocated for the job (Max 16GB)
– number of cores (Max 8)
– allocated time (Max 7days).

In addition, for your convenience, you may chose to create icons on the desktop to launch Matlab and RStudio, selecting the versions you prefer.  Once the remote desktop starts, you can always open a terminal, load the modules you need and start the software from the command line.  Selecting the checkbox “Custom Desktop Folder” will create a job specific desktop, which might be useful in case in different jobs you want launcher icons with different versions of Matlab or RStudio.

If you want to be notified by email when the job starts, please select the checkbox and include a valid email address in the form.  Once you have completed your sections,  press the “Launch” button.  Allow a few seconds for the system to process your submission form, and you will be redirected to the “My Interactive Sessions” page.

You will be able to click on “Launch noVNC in new Tab” to open the connection to the Remote Desktop directly in your browser.  The Remote Desktop runs the lightweight “Xfce” desktop.

Here some notes related to performance and usability within remote desktop type session:
Note: When running a Remote Desktop or app that uses the desktop (ex. Matlab), the noVNC client does not support sharing clipboard and direct “Copy and paste” between your computer and the remote session in noVNC. noVNC provides a “staging clipboard” that you can use to copy to and from the remote session.  Copy things to that clipboard first, and then you can copy to your remote session.

Note: The default resolution of the remote session is 1024×768 and by default the resolution will not adjust to client display size. That is to avoid to resize the remote server to very large resolution in case you are connected to a large screen external display, and avoid performance degradation. If you chose to, you can rescale the remote clicking on the setting “wheel” and select “scaling mode = remote resizing”

Note: The noVNC web client is very convenient as it does not require you to install a client to connect, but it does not support all features in terms of compression and performance optimization that TurboVNC client or another client would. If instead of using the web based client you prefer to use a traditional VNC client to connect to your session, please see later in this doc.

Note: If you close the noVNC tab or the connection times out due to long inactivity, you will be always able to reconnect to your session clicking again on the “Launch noVNC in new Tab” in the “My Interactive Sessions” page . Your job is controlled by Slurm and will keep running until the allocated time, or until you cancel the job.

Note: If you want to terminate your job and your Remote Desktop session, you can simply click the “Delete” button on the “My Interactive Sessions”  tab in the section corresponding to that particular job.

Internal Web Browser Version

Those who have launched Firefox on the Remote Desktop will notice that it is a very old version.  This is due to the OS we run on the cluster being intended for HPC use not for Desktop use, and thus not including the latest, greatest libraries and software but instead choosing stable, well proven software.  This model unfortunately does not work well for web browsers which need constant updating to fix security issues and to keep up with the latest features.  This has led browsers to have users install them directly rather than via the normal packaging system which Linux uses.  Also most browsers assume that users have full control over the system that they are installing them on, it was never conceived that some one would want to open a browser in a browser on a HPC cluster.

While the above reasons mean that we cannot easily provide a modern browser on the cluster, there is a way to get one if you need to open a browser on the Remote Desktop.  Firefox provides a tarball with a fully functional browser that you can download here.  Simply select the Linux 64-bit release.  Once you download the tarball you can unzip it using tar -jxvf packagename, after that run the firefox executable it unpacks.  That should then give you a modern browser you can use on the remote desktop.

 


Jupyter Notebook

This App allows you to submit a job which starts a Jupyter notebook on a compute node and provides a link to connect to it on a new browser tab. To launch the notebook, please select the “Jupyter notebook” entry from the “Interactive Apps” menu, and fill the form.  In the form you will be able to select :

– partition
– memory allocated for the job (Max 120GB)
– number of cores (Max 32)
– number of GPUs. Use this only if selecting a GPU enabled partition.
– allocated time (Max allowed depends on partition).

If you want to be notified by email when the job starts, please select the checkbox and include a valid email address in the form.  The field “Slurm Account” can be use to specify which lab account you want to charge in terms of FairShare for this particular job.  If you only are affiliated to one lab you please ignore that entry, as it will default to your primary group.

When you made your selection press the “Launch” button.  Allow a few seconds for system to process your submission form, and you will be redirected to the “My Interactive Sessions” page.

You will be able to use the “Connect to Jupyter” button to open the notebook in a new tab on your browser.

How do I access the python and R kernels installed in my conda environments?

Jupyter can see your local mamba/conda environments that include the ipykernel and nb_conda_kernels packages. When you access the notebook, in the dropdown menu “New” under the “Files” tab, you will see all the mamba/conda environments that you have in your home folder which have the ipykernel and nb_conda_kernels modules installed. For example in this use case it detects that the user has access, in addition to the central Python 3 environment, to two other conda environment, named python2.7 and tf1.10_cuda9

To enable a mamba environment in Jupyter install the ipykernel and nb_conda_kernels packages into the environment by doing:

mamba install ipykernel

mamba install nb_conda_kernels

After that is installed you should see the environment in new Jupyter sessions.

How do I access a conda environment located in a lab shared folder from Jupyter notebook VDI app?

Warning: When sharing conda environment, we highly recommend that only one person install/uninstall/update packages because the environment may break if multiple users change the conda environment.

When a conda environment is created, its path is added to the the file ~/.conda/environments.txt. People that would like to use a conda environment created by someone else need to add the conda environment path to ~/.conda/environments.txt.

For example, jharvard creates an environment in a shared lab space and installs ipykernel:

# request interactive node
[jharvard@boslogin01 conda_envs]$ salloc -p test --time=1:00:00 --mem=4000

# load modules
[jharvard@holy7c24604 conda_envs]$ module load Anaconda3/2020.11

# create shared conda environment
[jharvard@holy7c24604 conda_envs]$ conda create --prefix /n/holylabs/LABS/jharvard_lab/Lab/conda_envs/my_shared_env python=3.10

# launch conda environment and install ipykernel
[jharvard@holy7c24604 conda_envs]$ source activate /n/holylabs/LABS/jharvard_lab/Lab/conda_envs/my_shared_env
(/n/holylabs/LABS/jharvard_lab/Lab/conda_envs/my_shared_env) [jharvard@holy7c24604 conda_envs]$ conda install ipykernel

# environment path is automatically added to ~/.conda/environments.txt
(/n/holylabs/LABS/jharvard_lab/Lab/conda_envs/my_shared_env) [jharvard@holy7c24604 conda_envs]$ cat ~/.conda/environments.txt
/n/holylabs/LABS/jharvard_lab/Lab/conda_envs/my_shared_env

Now, user1 has to add the same environment path to their ~/.conda/environments.txt file:

[user1@boslogin01 ~]$ echo "/n/holylabs/LABS/jharvard_lab/Lab/conda_envs/my_shared_env" >> ~/.conda/environments.txt
[user1@boslogin01 ~]$ cat ~/.conda/environments.txt
/n/holylabs/LABS/jharvard_lab/Lab/conda_envs/my_shared_env

Now, user1 will be able to select my_shared_env in Jupyter notebook VDI app as explained above.

Can I control my conda environment from the Jupyter notebook page?

An extension of Jupyter (nb_conda) allows you to manage your conda environment from the notebook.  Navigate to the tab “conda” and you will see the list of your environment.  You can click on the environment you want to inspect or modify, and easily install or remove packages. For example, remember that to see your conda environments in your “new” drop down menu in the file tab, the environments need to have the ipykernel package installed. If you don’t have it installed, you can do it from this interface.  In this example I am installing “pandas” in the environment named “python2.7”

How do I load additional modules that my kernels need?

If you need to load modules before starting your kernel – for example if you need to load cuda and cudnn before starting a kernel with tensorflow – you can do that directly from the notebook.  First navigate to the tab “Modules” and start entering the name of the module you need to load. The list of the available modules that match what you are typing will popup. Select the module you need (in this example we are loading cuda 9.0)
Press “enter” and allow a few seconds for the load operation to complete (similarly to what happens in the interactive sessions loading modules can take a moment). Upon successful loading, the module will appear in the list of loaded modules.  If you need to unload that you can click on the “Unload” yellow button.

Repeat for all desired modules, and after you are all set, you can go back to the “File” tab and start your desired kernel.

Note: When you are done running your computation you can delete the job using the “Delete” button in the section for that particular job in the  “My Interactive Sessions” page.

Troubleshooting

Jupyter notebook VDI session is terminated right after it starts

This problem is common when there is a conda initialize section in your .bashrc file located in your home directory (more about .bashrc). The conda initialize section was added when, at some point, you used the command conda init. We strongly discourage the use of conda init. Instead use source activate environment_name, for more details, refer to our Python (Anaconda) page.

To solve this problem, delete or comment out the conda initialize section of your .bashrc and create a new Jupyter notebook VDI session.

Jupyter notebook/JupyterLab VDI session starts but does not display a ‘Connect to Jupyter’ button

If this problem occurs, you may see an error, jupyter: command not found, in

 ~/.fasrcood/data/sys/dashboard/batch_connect/sys/Jupyter/output/<sessionID>/output.log

On FASSE:

~/.fasseood/data/sys/dashboard/batch_connect/sys/Jupyter/output/<sessionID>/output.log

To solve this problem, delete the line auto_activate_base: false in the file ~/.condarc.


Matlab

This App allows you to submit a job which starts a Matlab session on a compute node and provides a link to connect to it on a new browser tab. To launch the notebook, select the “Matlab” entry from the “Interactive Apps” menu, and fill in the following form.

– partition (see partitions page for core, memory, and time limits on public partitions)
– memory allocated for the job
– number of cores
– number of hours

Refer to our Github User_Codes for an example on how to run a parallel code on VDI.


https://github.com/fasrc/User_Codes
17 forks.
82 stars.
9 open issues.

Recent commits:

RStudio Server

This app allows you to submit a job which starts a RStudio Server session  on a compute node and provides a link to connect to it on a new browser tab. To launch the notebook, select the “RStudio Server” entry from the “Interactive Apps” menu, and fill in the following form.

– partition (see partitions page for core, memory, and time limits on public partitions)
– memory allocated for the job
– number of cores
– number of hours

You can then select the version of R you want to run in your Rsession in RStudio.

If you want to be notified by email when the job starts select the checkbox and include a valid email address in the form. The “Slurm Account” can be use to specify which lab account you want to charge in terms of FairShare for this particular job. If you only are affiliated to one lab you can ignore that entry as it will default to your primary group.


When you made your selection press the “Launch” button. Allow a few seconds for the system to process your submission form, and you will be redirected to the “My Interactive Sessions” page.

You will be able to use the “Connect to RStudio Server” button to open the RStudio session in a new tab on your browser.

Note: When you are done running your computation you can delete the job using the “Delete” button in the section related to that particular job in the “My Interactive Sessions” page.

FASRC also has RStudio Desktop that can be launched from the Remote Desktop app. See the following docs for more information

Sign in to RStudio error

In very rare instances, you may come across a prompt to sign in to RStudio. If you are running RStudio Server and get a sign in prompt asking for Username and Password:

Go to the Open OnDemand dashboard (Cannon, FASSE). Then click on “Interactive Session” on the top menu and then click on the button “Connect to RStudio Server”. This will reopen the RStudio Server session.


Using a VNC Client to Connect

No client is needed to connect to to a session, but if instead of using the web based client you prefer to use a traditional VNC client (we highly recommend TurboVNC) to connect to your session, please click on My Interactive Sessions and the VNC Desktop Client tab for instructions.

 

]]>
19589