| title |
|---|
cuda, ml, ml-verse |
- Source repository: rocker-org/rocker-versioned2
- Dockerfile
- tags
- rocker/cuda
- rocker/ml
- rocker/ml-verse
- Published image details: rocker-org/rocker-versioned2's wiki
- Non-root default user:
- rocker/cuda: not exist
- rocker/ml:
rstudio - rocker/ml-verse:
rstudio
rocker/cuda, rocker/ml, and rocker/ml-verse are Docker images for machine learning and GPU-based computation in R.
These images correspond to rocker/r-ver,
rocker/tidyverse, and rocker/geospatial, respectively.
All images are based on the official NVIDIA CUDA docker build recipes,
and are installed the reticulate package.
The basic usage is the same as rocker/r-ver or rocker/rstudio except for the GPU setting.
R command line:
# CPU-only
docker run --rm -ti rocker/cuda
# Machines with nvidia-docker and GPU support
docker run --gpus all --rm -ti rocker/cudaRStudio Server instance:
# CPU-only
docker run -p 8787:8787 rocker/ml
# Machines with nvidia-docker and GPU support
docker run --gpus all -p 8787:8787 rocker/ml:::{.callout-important}
GPU use requires nvidia-docker runtime to run!
:::
See also the rocker/r-ver's reference (for rocker/cuda) and
the rocker/rstudio's reference (for rocker/ml and rocker/ml-verse).
If you want to switch the Python version called from reticulate,
you can use the reticulate's functions to install Python.
For example, with the following command, reticulate installs miniconda
and miniconda installs Python 3.7.
reticulate::install_miniconda()
reticulate::conda_install(packages = "python=3.7")The Python version used by the reticulate package can be checked with the reticulate::py_config() function.
reticulate::py_config()
#> python: /root/.local/share/r-miniconda/envs/r-reticulate/bin/python
#> libpython: /root/.local/share/r-miniconda/envs/r-reticulate/lib/libpython3.7m.so
#> pythonhome: /root/.local/share/r-miniconda/envs/r-reticulate:/root/.local/share/r-miniconda/envs/r-reticulate
#> version: 3.7.12 | packaged by conda-forge | (default, Oct 26 2021, 06:08:21) [GCC 9.4.0]
#> numpy: /root/.local/share/r-miniconda/envs/r-reticulate/lib/python3.7/site-packages/numpy
#> numpy_version: 1.17.5:::{.callout-important}
pyenv and pipenv,
which were previously installed, are no longer installed.
And, the previously set environment variables WORKON_HOME and PYTHON_VENV_PATH are no longer set.
(rocker-org/rocker-versioned2#494)
:::