...
Table of Contents | ||
---|---|---|
|
...
What is Jupyter and What is a Kernel?
Note |
---|
|
...
General Process
Info |
---|
The general process involves updating the |
...
Conda environment to include kernel related packages, and then configuring the kernel spec to allow it to be picked up by the Jupyter service. |
Info |
---|
|
...
Install the IRkernel package
Info |
---|
Activate you R Conda Environment and start R. |
Code Block |
---|
[salexan5@mblog2 ~]$ module load miniconda3/24.3.0 [salexan5@mblog2 ~]$ conda activate /project/arcc<project-name>/software/conda-envs/r_4.3.3_env/ (/project/arcc<project-name>/software/conda-envs/r_4.3.3_env) [salexan5@mblog2 ~]$ R > install.packages('IRkernel') ... also installing the dependencies ‘fastmap’, ‘fansi’, ‘utf8’, ‘htmltools’, ‘pillar’, ‘base64enc’, ‘repr’, ‘evaluate’, ‘IRdisplay’, ‘pbdZMQ’, ‘crayon’, ‘jsonlite’, ‘uuid’, ‘digest’ ... * DONE (IRkernel) |
...
Info |
---|
Installing the This can be found under the Conda environment location, under: |
Code Block |
---|
[salexan5@mblog2 ~]$ ls /project/arcc<project-name>/software/conda-envs/r_4.3.3_env/lib/R/library/IRkernel/kernelspec/ kernel.js kernel.json logo-64x64.png logo-svg.svg |
Code Block |
---|
[salexan5@mblog2 ~]$ cat /project/arcc<project-name>/software/conda-envs/r_4.3.3_env/lib/R/library/IRkernel/kernelspec/kernel.json {"argv": ["R", "--slave", "-e", "IRkernel::main()", "--args", "{connection_file}"], "display_name":"R", "language":"R" } |
...
Info |
---|
Copy the created |
Code Block |
---|
[salexan5@mblog2 ~]$ cd .local/share/jupyter/kernels/ [salexan5@mblog2 kernel]$ mkdir r_4.3.3 [salexan5@mblog2 kernel]$ cd r_4.3.3 [salexan5@mblog2 r_4.3.3]$ cp /project/arcc<project-name>/software/conda-envs/r_4.3.3_env/lib/R/library/IRkernel/kernelspec/* . |
Info |
---|
Update the
|
Code Block |
---|
[salexan5@mblog2 r_4.3.3]$ cat kernel.json {"argv": ["/project/arcc<project-name>/software/conda-envs/r_4.3.3_env/bin/R", "--slave", "-e", "IRkernel::main()", "--args", "{connection_file}"], "display_name":"R_4.3.3 (local)", "language":"R" } |
...
Start Jupyter
Info |
---|
From OnDemand start a Jupyter session. Notice how the nearly newly configured kernel is available. |
...
Code Block |
---|
# Cell Output: '/cluster/medbow/project/arcc<project-name>/software/conda-envs/r_4.3.3_env/lib/R/library' |
...
Code Block |
---|
# Cell Output: "Package" "LibPath" "Version" "Priority" "base" "base" "/cluster/medbow/project/arcc<project-name>/software/conda-envs/r_4.3.3_env/lib/R/library" "4.3.3" "base" ... "vctrs" "vctrs" "/cluster/medbow/project/arcc<project-name>/software/conda-envs/r_4.3.3_env/lib/R/library" "0.6.5" NA |
Info |
---|
Note the library path is that of the Conda environment: |
...
Prev |
Workshop Home | Next |