installConda {basilisk.utils} | R Documentation |
Install conda - specifically Miniconda, though historically we used Anaconda - to an appropriate destination path, skipping the installation if said path already exists.
installConda(installed = TRUE)
installed |
Logical scalar indicating whether basilisk is already installed.
Should only be set to |
This function was originally created from code in https://github.com/hafen/rminiconda,
also borrowing code from reticulate's install_miniconda
for correct Windows installation.
It downloads and runs a Miniconda installer to create a dedicated Conda instance that is managed by basilisk,
separate from other instances that might be available on the system.
Currently, we use version 4.8.3 of the Miniconda3 installer.
The installer itself is cached to avoid re-downloading it when, e.g., re-installing basilisk across separate R sessions.
Users can obtain/delete the cached installer by looking at the contents of the parent directory of getExternalDir
.
This caching behavior is disabled for system installations (see useSystemDir
), which touch nothing except the system directories;
in such cases, only repeated installation attempts in the same R session will re-use the same installer.
A conda instance is created at the location specified by getCondaDir
.
Nothing is performed if a complete instance already exists at that location.
A logical scalar is returned indicating whether a new instance was created.
Whenever installConda
is re-run (and BASILISK_USE_SYSTEM_DIR
is not set, see ?getCondaDir
),
any previous conda instances and their associated basilisk environments are destroyed.
This avoids duplication of large conda instances after their obselescence.
Client packages are expected to recreate their environments in the latest conda instance.
Users can disable this destruction by setting the BASILISK_NO_DESTROY
environment variable to "1"
.
This may be necessary on rare occasions when running multiple R instances on the same Bioconductor release.
Note that setting this variable is not required for R instances using different Bioconductor releases;
the destruction is smart enough to only remove conda instances generated from the same release.
Aaron Lun
# We can't actually run installConda() here, as it # either relies on basilisk already being installed or # it has a hard-coded path to the basilisk system dir. print("dummy test to pass BiocCheck")