-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alternative containers hierarchy layout for R and Python integration in CUDA enabled projects #34
Comments
The solution described is implemented in this two "template" projects, used for quick setup of R and python research projects, in a heterogeneous environment as a statistics department can be. In this context, some features are important:
The reference template projects are:
Both project support container execution and are based on standard Rocker images The R dependencies are managed by renv, with full dependency specification in DESCRIPTION file The python part is not inherited by rocker containers but is managed in two stages:
this is automated by this script: /docker/r-images/scripts/setup/setup_ubs-all.sh This script, after virtualenv package installation, prepare jupyter lab environment by pulling node-js modules required by front end language support. It also register virtualenv for reticulate use and IRKernel as a jupyter kernel. renv installation is also triggered An important note: the splitting of "setup" procedure in two different phases (build, runtime) is requested by the different nature of "storage" class visible:
The detail of this volume mapping are defined in this Makefile, that holds all the podman interactions In the next comment, a diagram of the project architecture |
project layout: drawio source |
@hute37 Very cool, thanks for sharing. It seems like you have a nice workflow for adding your cuda and python needs on top of the existing rocker/versioned2 stack, which is lovely. In the thread from 903 you mentioned that you were looking for a solution that supported cuda 12, right? Above you mention the need to support GPU architectures, but from a quick skim it's not clear how you handle that. I did see your cuda dir with scripts of considerable complexity there already, so maybe you already have a good solution here? Just want to make sure I'm understanding if there's a question in here somewhere or just sharing a different approach that is ready and working? |
Cross reference regarding Python installation in the Rocker images: |
With pre-built CUDA-based R + Python images one must pin versions to prevent breaking changes. For example
One also has to consider when the base image ( |
@hute37 Regarding rocker-org/rocker-versioned2#903 (comment), i.e. new projects (PyTorch) requiring CUDA 12:
Originally posted by @benz0li in iot-salzburg/gpu-jupyter#153 (comment) See also: |
CUDA-12 support is not ready yet. I think I'll follow the same path I followed when I had to downgrade In this version, the project templates are sill using CUDA-11 support from latest While this seems to work in R (keras) container tests, this is a problem for our current python environment. Python based projects (derived from dve-sample-py) also support native ("un-contenerized") pyenv/poetry execution. In this case, I prepare the virtual machines following a manual CUDA setup. The manual installation script is in this file (emacs org-mode) (ASAP) I plan to port this manual setup in cuda-560 image build script: A pair of notes about (rootless) Podman:
|
Use driver version 535 (Long Term Support Branch) with NVIDIA Data Center GPUs or select NGC-Ready NVIDIA RTX boards to ensure forward compatibility until June 2026. |
Coming from tensorflow projects, we introduced pytorch only recently. I noticed that It seems to work in a pair of active projects. See: |
@hute37 Regarding TensorFlow (versions ≥ 2.18): |
This note present an alternative approach that can be used to integrate R and Python stacks with a different container layout
In this alternative layout, python features are introduced after R stack.
This choice has the important implication of enable standard Rocker images (r-base, verse, geospatial) as a base image, avoiding R setup replication.
This discussion is a follow up of some comments in issue:
related to deprecation of CUDA enabled images:
For a previous related discussion on CUDA support versioning, see also:
A brief presentation of this alternative layout in the following comments
The text was updated successfully, but these errors were encountered: