diff --git a/Dockerfile b/Dockerfile index 2f580db..f40b4f0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -110,12 +110,13 @@ WORKDIR $ESI_DIR COPY .opticks .opticks COPY epic epic -COPY opticks opticks COPY tests tests COPY README.md . COPY NVIDIA-OptiX-SDK-7.6.0-linux64-x86_64.sh . COPY pyproject.toml . +RUN mkdir -p $OPTICKS_HOME && curl -sL https://github.com/BNLNPPS/esi-opticks/archive/d7b4337.tar.gz | tar -xz --strip-components 1 -C $OPTICKS_HOME + RUN poetry install RUN chmod -R 777 /opt/pypoetry @@ -126,38 +127,8 @@ opticks-" >> /etc/profile.d/z20_opticks.sh RUN mkdir -p $OPTIX_DIR && ./NVIDIA-OptiX-SDK-7.6.0-linux64-x86_64.sh --skip-license --prefix=$OPTIX_DIR -RUN cmake -S opticks/okconf -B $OPTICKS_PREFIX/build/okconf -DCMAKE_MODULE_PATH=$OPTICKS_HOME/cmake/Modules -DCMAKE_INSTALL_PREFIX=$OPTICKS_PREFIX \ - && cmake --build $OPTICKS_PREFIX/build/okconf --parallel $(nproc) --target install - -RUN cmake -S opticks/sysrap -B $OPTICKS_PREFIX/build/sysrap -DCMAKE_MODULE_PATH=$OPTICKS_HOME/cmake/Modules -DCMAKE_INSTALL_PREFIX=$OPTICKS_PREFIX \ - && cmake --build $OPTICKS_PREFIX/build/sysrap --parallel $(nproc) --target install - -RUN cmake -S opticks/ana -B $OPTICKS_PREFIX/build/ana -DCMAKE_MODULE_PATH=$OPTICKS_HOME/cmake/Modules -DCMAKE_INSTALL_PREFIX=$OPTICKS_PREFIX \ - && cmake --build $OPTICKS_PREFIX/build/ana --parallel $(nproc) --target install - -RUN cmake -S opticks/analytic -B $OPTICKS_PREFIX/build/analytic -DCMAKE_MODULE_PATH=$OPTICKS_HOME/cmake/Modules -DCMAKE_INSTALL_PREFIX=$OPTICKS_PREFIX \ - && cmake --build $OPTICKS_PREFIX/build/analytic --parallel $(nproc) --target install - -RUN cmake -S opticks/bin -B $OPTICKS_PREFIX/build/bin -DCMAKE_MODULE_PATH=$OPTICKS_HOME/cmake/Modules -DCMAKE_INSTALL_PREFIX=$OPTICKS_PREFIX \ - && cmake --build $OPTICKS_PREFIX/build/bin --parallel $(nproc) --target install - -RUN cmake -S opticks/CSG -B $OPTICKS_PREFIX/build/CSG -DCMAKE_MODULE_PATH=$OPTICKS_HOME/cmake/Modules -DCMAKE_INSTALL_PREFIX=$OPTICKS_PREFIX \ - && cmake --build $OPTICKS_PREFIX/build/CSG --parallel $(nproc) --target install - -RUN cmake -S opticks/qudarap -B $OPTICKS_PREFIX/build/qudarap -DCMAKE_MODULE_PATH=$OPTICKS_HOME/cmake/Modules -DCMAKE_INSTALL_PREFIX=$OPTICKS_PREFIX \ - && cmake --build $OPTICKS_PREFIX/build/qudarap --parallel $(nproc) --target install - -RUN cmake -S opticks/CSGOptiX -B $OPTICKS_PREFIX/build/CSGOptiX -DCMAKE_MODULE_PATH=$OPTICKS_HOME/cmake/Modules -DCMAKE_INSTALL_PREFIX=$OPTICKS_PREFIX -DCMAKE_BUILD_TYPE=Debug \ - && cmake --build $OPTICKS_PREFIX/build/CSGOptiX --parallel $(nproc) --target install - -RUN cmake -S opticks/gdxml -B $OPTICKS_PREFIX/build/gdxml -DCMAKE_MODULE_PATH=$OPTICKS_HOME/cmake/Modules -DCMAKE_INSTALL_PREFIX=$OPTICKS_PREFIX \ - && cmake --build $OPTICKS_PREFIX/build/gdxml --parallel $(nproc) --target install - -RUN cmake -S opticks/u4 -B $OPTICKS_PREFIX/build/u4 -DCMAKE_MODULE_PATH=$OPTICKS_HOME/cmake/Modules -DCMAKE_INSTALL_PREFIX=$OPTICKS_PREFIX \ - && cmake --build $OPTICKS_PREFIX/build/u4 --parallel $(nproc) --target install - -RUN cmake -S opticks/g4cx -B $OPTICKS_PREFIX/build/g4cx -DCMAKE_MODULE_PATH=$OPTICKS_HOME/cmake/Modules -DCMAKE_INSTALL_PREFIX=$OPTICKS_PREFIX \ - && cmake --build $OPTICKS_PREFIX/build/g4cx --parallel $(nproc) --target install +RUN cmake -S opticks -B $OPTICKS_PREFIX/build -DCMAKE_INSTALL_PREFIX=$OPTICKS_PREFIX -DCMAKE_BUILD_TYPE=Release \ + && cmake --build $OPTICKS_PREFIX/build --parallel --target install # Allow non-root users rebuild Opticks in interactive shell RUN chmod -R 777 ${OPTICKS_PREFIX}