remote_config: Generic Remote Launch Configuration

View source: R/launchers.R

remote_configR Documentation

Generic Remote Launch Configuration

Description

Provides a flexible generic framework for generating the shell commands to deploy daemons remotely.

Usage

remote_config(
  command = NULL,
  args = c("", "."),
  rscript = "Rscript",
  quote = FALSE
)

Arguments

command

the command used to effect the daemon launch on the remote machine as a character string (e.g. "ssh"). Defaults to "ssh" for ssh_config, although may be substituted for the full path to a specific SSH application. The default NULL for remote_config does not carry out any launches, but causes launch_remote() to return the shell commands for manual deployment on remote machines.

args

(optional) arguments passed to command, as a character vector that must include "." as an element, which will be substituted for the daemon launch command. Alternatively, a list of such character vectors to effect multiple launches (one for each list element).

rscript

[default "Rscript"] assumes the R executable is on the search path. Replace with the full path of the Rscript executable on the remote machine if necessary. If launching on Windows, "Rscript" should be replaced with "Rscript.exe".

quote

[default FALSE] logical value whether or not to quote the daemon launch command (not required for Slurm "srun" for example, but required for Slurm "sbatch" or "ssh").

Value

A list in the required format to be supplied to the remote argument of daemons() or launch_remote().

See Also

ssh_config() for SSH launch configurations, or cluster_config() for cluster resource manager launch configurations.

Examples

# Slurm srun example
remote_config(
  command = "srun",
  args = c("--mem 512", "-n 1", "."),
  rscript = file.path(R.home("bin"), "Rscript")
)

# SSH requires 'quote = TRUE'
remote_config(
  command = "/usr/bin/ssh",
  args = c("-fTp 22 10.75.32.90", "."),
  quote = TRUE
)

# can be used to start local dameons with special configurations
remote_config(
  command = "Rscript",
  rscript = "--default-packages=NULL --vanilla"
)


mirai documentation built on June 26, 2025, 1:08 a.m.