Skip to content

Commit

Permalink
Add installation and environment for fluka
Browse files Browse the repository at this point in the history
  • Loading branch information
EinarElen committed Feb 10, 2023
1 parent 7ffc419 commit 1931fbc
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,8 @@ RUN mkdir -p /usr/local/root &&\
COPY ./certs/ /usr/local/share/ca-certificates
RUN update-ca-certificates

COPY fluka_4-3.1.x86-Linux-gfor7_amd64.deb /
RUN apt-get install /fluka_4-3.1.x86-Linux-gfor7_amd64.deb
#run environment setup when docker container is launched and decide what to do from there
# will require the environment variable LDMX_BASE defined
COPY ./entry.sh /etc/
Expand Down
20 changes: 20 additions & 0 deletions entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,32 @@ do
done
unset _external_path


# helps simplify any cmake nonsense
export CMAKE_PREFIX_PATH=/usr/local/:$LDMX_SW_INSTALL

# puts a config/cache directory for matplotlib to use
export MPLCONFIGDIR=$LDMX_BASE/.config/matplotlib

# FLUKA Environment
# From env_FLUKA.sh
export PATH=$PATH:/usr/local/fluka/bin
export FLUKA_PATH=$(realpath $(dirname $(which fluka))/..)
if [ ! -d "$FLUKA_PATH" ]; then
echo "!!! fluka not found. FLUKA_REPO=$FLUKA_PATH. Add your fluka_repo/bin to the PATH. !!!";
fi

export FLUKADATA=$FLUKA_PATH/data
if [ ! -d "$FLUKADATA" ]; then
echo "!!! fluka data repo not found. FLUKADATA=$FLUKADATA. Add your fluka_repo/bin to the PATH. !!!";
fi

export FLUKA_LIB_DIR=$FLUKA_PATH/lib
if [ ! -d "$FLUKA_LIB_DIR" ]; then
echo "!!! fluka lib repo not found. FLUKA_LIB_DIR=$FLUKA_LIB_DIR. Add your fluka_repo/bin to the PATH. !!!";
fi

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$FLUKA_LIB_DIR
# go to first argument
cd "$1"

Expand Down

0 comments on commit 1931fbc

Please sign in to comment.