install_onnxruntime()
installs just the onnxruntime python package and it's
direct dependencies to inference model.
Usage
install_onnxruntime(
method = c("auto", "virtualenv", "conda"),
conda = "auto",
version = "1.12.0",
envname = NULL,
restart_session = TRUE,
conda_python_version = NULL,
...,
pip_ignore_installed = TRUE,
python_version = conda_python_version
)
Arguments
- method
Installation method. By default, "auto" automatically finds a method that will work in the local environment. Change the default to force a specific installation method. Note that the "virtualenv" method is not available on Windows.
- conda
The path to a
conda
executable. Use"auto"
to allowreticulate
to automatically find an appropriateconda
binary. See Finding Conda andconda_binary()
for more details.- version
onnxruntime version to install.
- envname
The name, or full path, of the environment in which Python packages are to be installed. When
NULL
(the default), the active environment as set by theRETICULATE_PYTHON_ENV
variable will be used; if that is unset, then ther-reticulate
environment will be used.- restart_session
Restart R session after installing (note this will only occur within RStudio)
- ...
other arguments passed to
reticulate::conda_install()
orreticulate::virtualenv_install()
, depending on themethod
used.- pip_ignore_installed
Whether pip should ignore installed python packages and reinstall all already installed python packages. This defaults to
TRUE
, to ensure that onnxruntime dependencies like NumPy are compatible with the prebuilt onnxruntime binaries.- python_version, conda_python_version
Pass a string like "3.8" to request that conda install a specific Python version. This is ignored when attempting to install in a Python virtual environment.