Skip to content

Commit

Permalink
fix: simple
Browse files Browse the repository at this point in the history
  • Loading branch information
plexoos committed Apr 25, 2024
1 parent 241549d commit 96755e7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 69 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ jobs:
with:
ref: ${{ steps.semantic.outputs.new_release_git_tag }}

- name: Login to GitHub container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build container
uses: docker/build-push-action@v5
with:
Expand Down
69 changes: 0 additions & 69 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,72 +12,3 @@ RUN apt update \
cuda-nvcc-11-8 libcurand-dev-11-8 \
&& apt clean \
&& rm -rf /var/lib/apt/lists/*

RUN mkdir -p /opt/spack && curl -sL https://github.com/spack/spack/archive/v0.21.0.tar.gz | tar -xz --strip-components 1 -C /opt/spack

RUN echo "source /opt/spack/share/spack/setup-env.sh" > /etc/profile.d/z09_source_spack_setup.sh

SHELL ["/bin/bash", "-l", "-c"]

RUN <<EOF
spack install geant4
spack install boost+system+program_options+regex+filesystem
spack install cmake
spack install nlohmann-json
spack uninstall -f -y g4ndl g4emlow
spack clean -a
EOF

# Strip all the binaries
#RUN find -L /spack/opt/spack -type f -exec readlink -f '{}' \; | xargs file -i | grep 'charset=binary' | grep 'x-executable\|x-archive\|x-sharedlib' | awk -F: '{print $1}' | xargs strip -S

RUN sed -i 's/ exec "\/bin\/bash"/ exec "\/bin\/bash" "-l"/g' /opt/nvidia/nvidia_entrypoint.sh

COPY <<"EOF" /tmp/patch_spack_default_modules.yaml
include:
- CPATH
lib64:
- LD_LIBRARY_PATH
lib:
- LD_LIBRARY_PATH
EOF

RUN sed -i '/ prefix_inspections:/r /tmp/patch_spack_default_modules.yaml' /opt/spack/etc/spack/defaults/modules.yaml
RUN sed -i 's/ autoload: direct/\ autoload: none/g' /opt/spack/etc/spack/defaults/modules.yaml

RUN spack module tcl refresh -y
RUN cp -r /opt/spack/share/spack/modules/$(spack arch) /opt/modules
RUN echo "module use --append /opt/modules" >> /etc/profile.d/z10_load_spack_modules.sh
RUN spack module tcl loads geant4 clhep boost cmake nlohmann-json >> /etc/profile.d/z10_load_spack_modules.sh
RUN rm -fr /opt/spack/share/spack/modules/$(spack arch)

# create a placeholder dir for NVIDIA OptiX
RUN mkdir -p /usr/local/optix

ENV ESI_DIR=/esi-opticks
ENV OPTICKS_HOME=$ESI_DIR/opticks
ENV OPTICKS_PREFIX=/usr/local/opticks
ENV OPTICKS_CUDA_PREFIX=/usr/local/cuda
ENV OPTICKS_OPTIX_PREFIX=/usr/local/optix
ENV OPTICKS_COMPUTE_CAPABILITY=52
ENV PYTHONPATH=${OPTICKS_HOME}

COPY epic $ESI_DIR/epic
COPY opticks $ESI_DIR/opticks
COPY .opticks $ESI_DIR/.opticks

WORKDIR $OPTICKS_HOME

RUN mkdir -p $ESI_DIR
COPY <<-"EOF" /etc/profile.d/z20_opticks.sh
source $OPTICKS_HOME/opticks.bash
opticks-
EOF

RUN opticks-full-externals
RUN <<EOF
source om.bash
om-(){ echo "skip sourcing om.bash"; }
om-subs--all(){ deps=(okconf sysrap ana analytic bin CSG qudarap gdxml u4); printf '%s\n' "${deps[@]}"; }
opticks-full-make
EOF

0 comments on commit 96755e7

Please sign in to comment.