1+ # Ultimately to be consistent with the Red Hat Open AI (RHOAI) environment
2+ # (and attendant HW) that is avaiable to us in the NERC MOC we base our
3+ # images on the RHOAI provided images. The src for these are maintained
4+ # here:
5+ # https://github.com/red-hat-data-services/notebooks
6+ # the images are published here:
7+ # https://quay.io/organization/modh
8+ #
9+
10+ # The image we have choosen is
11+ # quay.io/modh/cuda-notebooks:cuda-jupyter-minimal-ubi9-python-3.11-20250808
12+
13+ # NERC maintains a drived based image that added various packages we need for
14+ # our development environment see distro packages below
15+ # src: https://github.com/nerc-images/csw-base-cuda-minimal
16+ # img: quay.io/nerc-images/csw-base-cuda-minimal:latest
17+ FROM quay.io/nerc-images/csw-base-cuda-minimal:latest
18+
19+ USER root
20+
21+ # CUDA
22+ # the following repo is already available from the base so we don't re add but here
23+ # for documentation purposes
24+ # as per https://docs.nvidia.com/cuda/cuda-installation-guide-linux/#network-repo-installation-for-fedora
25+ # we do this so that additional repositories are available even non-NVIDIA ones
26+
27+ # add nvidia nsight-systems cli : https://docs.nvidia.com/nsight-systems/InstallationGuide/index.html
28+ RUN rpm --import https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub && \
29+ dnf config-manager --add-repo "https://developer.download.nvidia.com/devtools/repos/rhel$(source /etc/os-release; echo ${VERSION_ID%%.*})/$(rpm --eval '%{_arch}' | sed s/aarch/arm/)/"
30+
31+ # add cmake so that nvidia samples can be built
32+ RUN dnf install -y \
33+ nsight-systems-cli && \
34+ yum clean all \
35+ && rm -rf /var/cache/yum/*
36+
37+ # DISTRO PACKAGES
38+ # nerc minimal has all the based distro packages we need see
39+ # https://github.com/nerc-images/csw-base-cuda-minimal/blob/main/Containerfile
40+ # cmake, emacs, bc, jq, texlive, man-pages
41+
42+ # PYTHON PACKAGES
43+ # python stuff for ope compatability
44+ RUN pip install \
45+ nbstripout \
46+ jupyter-book \
47+ ghp-import \
48+ jupytext \
49+ jupyter_nbextensions_configurator \
50+ jupyter_contrib_nbextensions \
51+ jupyterlab-spellchecker \
52+ nbconvert \
53+ pyppeteer \
54+ jupyterlab-myst \
55+ nbgitpuller \
56+ jupyterlab_rise \
57+ pyright \
58+ python-lsp-server
59+
60+ # bash kernel to make it easier bash based juypter notebooks
61+ RUN pip install bash_kernel && python -m bash_kernel.install
62+
63+ # as per the nbstripout readme we setup nbstripout be always be used for the joyvan user for all repos
64+ RUN nbstripout --install --system
65+
66+ # OPE TOOLS
67+ RUN mkdir /home/ope && \
68+ cd /home/ope && \
69+ git clone https://github.com/OPEFFORT/tools.git . && \
70+ ./install.sh && \
71+ fix-permissions /home/ope
72+
73+ # CUDA SUDA WUDA TOOLS
74+ RUN mkdir /home/csw && \
75+ cd /home/csw && \
76+ git clone https://github.com/jappavoo/batchtools.git && \
77+ for f in /home/csw/batchtools/b*; do \
78+ ln -s $f /usr/local/bin/$(basename $f); \
79+ done
80+
81+ COPY . /tools
82+ RUN pwd && ls -la && ls -la /tools
83+ WORKDIR /tools
84+ RUN pip install -e .
85+
86+ # Cats and dogs python packages
87+ RUN pip install \
88+ numpy \
89+ matplotlib \
90+ pandas
91+
92+ USER 1001
0 commit comments