diff --git a/Dockerfile b/Dockerfile index 3b8a490..8e6a0e0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -69,12 +69,15 @@ ENV NVIDIA_DRIVER_CAPABILITIES=graphics,compute,utility WORKDIR $ESI_DIR +COPY .opticks .opticks COPY epic epic COPY opticks opticks -COPY .opticks .opticks +COPY patches patches COPY tests tests COPY NVIDIA-OptiX-SDK-7.6.0-linux64-x86_64.sh . +RUN patch -p1 opticks/sysrap/sevt.py patches/opticks-fix-update-array-dtype-for-numpy-1.26.patch + COPY <<-"EOF" /etc/profile.d/z20_opticks.sh source $OPTICKS_HOME/opticks.bash opticks- diff --git a/patches/opticks-fix-update-array-dtype-for-numpy-1.26.patch b/patches/opticks-fix-update-array-dtype-for-numpy-1.26.patch new file mode 100644 index 0000000..d72abfc --- /dev/null +++ b/patches/opticks-fix-update-array-dtype-for-numpy-1.26.patch @@ -0,0 +1,33 @@ +From 3c2a0ac17c2fb6d00cb08c2e7add4660642e8c46 Mon Sep 17 00:00:00 2001 +From: Dmitri Smirnov +Date: Fri, 24 May 2024 12:41:09 -0400 +Subject: [PATCH] fix: update array dtype for numpy >= 1.26 + +--- + sysrap/sevt.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/sysrap/sevt.py b/sysrap/sevt.py +index 191926c34..a67de5d7e 100644 +--- a/sysrap/sevt.py ++++ b/sysrap/sevt.py +@@ -380,13 +380,13 @@ class SEvt(object): + qtab = eval(qtab_) + qtab_ = qtab_.replace("q","%s.q" % symbol) + +- nosc = np.ones(len(qq), dtype=np.bool ) # start all true ++ nosc = np.ones(len(qq), dtype=bool ) # start all true + nosc[np.where(qq == pcf.SC)[0]] = 0 # knock out photons with scatter in their histories + +- nore = np.ones(len(qq), dtype=np.bool ) # start all true ++ nore = np.ones(len(qq), dtype=bool ) # start all true + nore[np.where(qq == pcf.RE)[0]] = 0 # knock out photons with reemission in their histories + +- noscab = np.ones(len(qq), dtype=np.bool ) # start all true ++ noscab = np.ones(len(qq), dtype=bool ) # start all true + noscab[np.where(qq == pcf.SC)[0]] = 0 # knock out photons with scatter in their histories + noscab[np.where(qq == pcf.AB)[0]] = 0 # knock out photons with bulk absorb in their histories + else: +-- +2.39.3 +