# Slurm srun example
remote_config(
command = "srun",
args = c("--mem 512", "-n 1", "."),
rscript = file.path(R.home("bin"), "Rscript")
)
# Slurm sbatch requires 'quote = TRUE'
remote_config(
command = "sbatch",
args = c("--mem 512", "-n 1", "--wrap", "."),
rscript = file.path(R.home("bin"), "Rscript"),
quote = TRUE
)
# SSH also 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"
)
# direct SSH example
ssh_config(c("ssh://10.75.32.90:222", "ssh://nodename"), timeout = 5)
# SSH tunnelling example
ssh_config(c("ssh://10.75.32.90:222", "ssh://nodename"), tunnel = TRUE)
if (FALSE) {
# launch 2 daemons on the remote machines 10.75.32.90 and 10.75.32.91 using
# SSH, connecting back directly to the host URL over a TLS connection:
daemons(
url = host_url(tls = TRUE),
remote = ssh_config(c("ssh://10.75.32.90:222", "ssh://10.75.32.91:222"))
)
# launch 2 daemons on the remote machine 10.75.32.90 using SSH tunnelling:
daemons(
n = 2,
url = local_url(tcp = TRUE),
remote = ssh_config("ssh://10.75.32.90", tunnel = TRUE)
)
}
Run the code above in your browser using DataLab