5.2.2 Install Oracle Machine Learning for R Server Across Exadata Compute Nodes Using DCLI for 26ai
How to use DCLI to install Oracle Machine Learning for R Server across multiple Exadata Linux compute nodes for Oracle AI Database 26ai.
- Get a list of the compute nodes in the rack.
In the following example, the
cat nodescommand lists the nodes for a two-node cluster.$ cat nodes exadb01 exadb02 - In a text editor, create a file that contains the names of all of the compute
nodes in the rack. Specify each node name on a separate line. For example, the
nodes file for a two-node cluster would contain entries such as the
following:
exadb01 exadb02 - Ensure that the
ORACLE_HOME,ORACLE_SID,R_HOME,PATH, andLD_LIBRARY_PATHenvironment variables are properly set on each node, and are defined in the same shell in which you will run the DCLI script. For example, you could specify values like the following in a bashrc file:export ORACLE_HOME=/u01/app/oraclecle/product/release_number/dbhome_1 export ORACLE_SID=ORCL export R_HOME=/usr/lib64/R export PATH=$PATH:$R_HOME/bin:$ORACLE_HOME/bin export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib:$RHOME_lib:$R_HOME/port/Linux-X64/lib - Option 1: On the first database node only, run as sysdba the
rqcfg.sqlscript from your PDB.$ sqlplus / as sysdba; SQL> alter session set container=PDBNAME; SQL> @$ORACLE_HOME/R/server/rqcfg.sqlNote:
Therqcfg.sqlscript ships with Oracle AI Database 26ai and resides in the$ORACLE_HOME/R/serverdirectory. The script installs the Oracle Machine Learning for R Server components in the database and you need to run it only once.The
rqcfg.sqlscript prompts you for the following input parameters:define permtbl = permanent tablespace name for RQSYS schema define temptbl = temporary tablespace name for RQSYS schema define orahome = ORACLE_HOME path define rhome = R_HOME pathOption 2: Run the
rqcfg.sqlscript from the Linux command line.In the example, the user is
systemwith the passwordapassword, the RQSYS schema is in SYSAUX and SYSAUX is assigned the temporary tablespaceTEMP. The value forORACLE_HOMEis/u01/app/oracle/product/23c/dbhome_1and the value forR_HOMEis the Linux default path,/usr/lib64/R:$ sqlplus -L -S system/apassword @$ORACLE_HOME/R/server/rqcfg.sql SYSAUX TEMP /u01/app/oracle/product/23c/dbhome_1 /usr/lib64/R - Download and install the Oracle Machine Learning for R supporting
packages.
To download ths supporting packages, go to the Oracle Machine Learning for R Downloads website. Select Supporting in the column for your version of the database, accept the license agreement, and download the
ore-supporting-linux-x86-64-version.zipfile.Log in as root and copy the installers for the supporting packages across the nodes. For example:
$ dcli -g nodes -l oracle mkdir -p /home/oracle/Oracle Machine Learning for R $ dcli -g nodes -l oracle -f ore-supporting-linux-x86-64-version.zip -d /home/oracle/Oracle Machine Learning for R/ore-supporting-linux-x86-64-version.zipUnzip the supporting packages on each node:
$ dcli -t -g nodes -l oracle unzip /home/oracle/Oracle Machine Learning for R/ore-supporting-linux-x86-64-version.zip -d /my_destination_directory/Install the Oracle Machine Learning for R supporting packages, as in the following example:
$ dcli -t -g nodes -l oracle R CMD INSTALL /my_destination_directory/supporting/* -l $ORACLE_HOME/R/library/Note:
The
rqcfg.sqlscript creates an Oracle Machine Learning for R user. By default, the script does not grant the RQADMIN role to the user.Any Oracle Machine Learning for R user can use an embedded R execution function, but only those with the RQADMIN role can create and drop the R scripts in the Oracle Machine Learning for R script repository in the database. Use caution when granting the RQADMIN role.
- Verify the Oracle Machine Learning for R loads.
$ ORE > library(ORE) Loading required package: OREbase Attaching package: OREbase The following objects are masked from âpackage:baseâ: cbind, data.frame, eval, interaction, order, paste, pmax, pmin, rbind, table Loading required package: OREembed Loading required package: OREstats Loading required package: MASS Loading required package: OREgraphics Loading required package: OREeda Loading required package: OREmodels Loading required package: OREdm Loading required package: lattice Loading required package: OREpredict Loading required package: ORExml