-
Notifications
You must be signed in to change notification settings - Fork 0
/
Docker.ub22.04-cuda12.1-pytorch2.2.1-larndsim
103 lines (91 loc) · 4.21 KB
/
Docker.ub22.04-cuda12.1-pytorch2.2.1-larndsim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
FROM deeplearnphysics/larcv2:ub22.04-cuda12.1-pytorch2.2.1-extra
LABEL maintainer="drinkingkazu"
LABEL contact="[email protected]"
LABEL type="gpu"
LABEL version="ub22.04-cuda12.1-pytorch2.2.1-larndsim"
ARG DEBIAN_FRONTEND=noninteractive
ENV XDG_RUNTIME_DIR=/tmp/$USER
# root
ENV ROOTSYS=/app/root
ENV PATH="${ROOTSYS}/bin:${PATH}"
ENV LD_LIBRARY_PATH="${ROOTSYS}/lib:${LD_LIBRARY_PATH}"
ENV PYTHONPATH="${ROOTSYS}/lib:${PYTHONPATH}"
# geant4
ENV PATH="/app/geant4/bin:${PATH}"
ENV LD_LIBRARY_PATH="/app/geant4/lib:${LD_LIBRARY_PATH}"
#edepsim
ENV PATH="/app/edep/bin:${PATH}"
ENV LD_LIBRARY_PATH="/app/edep/lib:${LD_LIBRARY_PATH}"
# larcv
ENV LARCV_BASEDIR=/app/larcv2
ENV LARCV_BUILDDIR="${LARCV_BASEDIR}/build"
ENV LARCV_COREDIR="${LARCV_BASEDIR}/larcv/core"
ENV LARCV_APPDIR="${LARCV_BASEDIR}/larcv/app"
ENV LARCV_LIBDIR="${LARCV_BUILDDIR}/lib"
ENV LARCV_INCDIR="${LARCV_BUILDDIR}/include"
ENV LARCV_BINDIR="${LARCV_BUILDDIR}/bin"
ENV LARCV_ROOT6=1
ENV LARCV_CXX=g++
# with numpy
ENV LARCV_NUMPY=1
ENV LARCV_PYTHON=/usr/bin/python3
ENV LARCV_PYTHON_CONFIG=python3.10-config
ENV LARCV_INCLUDES=" -I/app/larcv2/build/include -I/usr/include/python3.10 -I/usr/local/lib/python3.10/dist-packages/numpy/core/include"
ENV LARCV_LIBS=" -L/usr/lib/ -L/usr/lib/python3.10/config-3.10-x86_64-linux-gnu -L/usr/lib -lcrypt -lpthread -ldl -lutil -lm -L/app/larcv2/build/lib -llarcv"
# DLPGenerator
ENV DLPGENERATOR_ROOT6=1
ENV DLPGENERATOR_CXX=g++
ENV DLPGENERATOR_NUMPY=1
ENV DLPGENERATOR_DIR=/app/DLPGenerator
ENV DLPGENERATOR_BINDIR="${DLPGENERATOR_DIR}/bin"
ENV DLPGENERATOR_INCDIR="${DLPGENERATOR_DIR}/build/include"
ENV DLPGENERATOR_BUILDDIR="${DLPGENERATOR_DIR}/build"
ENV DLPGENERATOR_LIBDIR="${DLPGENERATOR_DIR}/build/lib"
# set bin and lib path
ENV PATH=${LARCV_BASEDIR}/bin:${LARCV_BINDIR}:${DLPGENERATOR_BINDIR}:${PATH}
ENV LD_LIBRARY_PATH=${LARCV_LIBDIR}:${DLPGENERATOR_LIBDIR}:${LD_LIBRARY_PATH}:
ENV PYTHONPATH=${LARCV_BASEDIR}/python:${DLPGENERATOR_DIR}/python:${PYTHONPATH}
# for geant4
ENV G4NEUTRONHPDATA="/app/geant4/share/Geant4-10.6.3/data/G4NDL4.6"
ENV G4LEDATA="/app/geant4/share/Geant4-10.6.3/data/G4EMLOW7.9.1"
ENV G4LEVELGAMMADATA="/app/geant4/share/Geant4-10.6.3/data/PhotonEvaporation5.5"
ENV G4RADIOACTIVEDATA="/app/geant4/share/Geant4-10.6.3/data/RadioactiveDecay5.4"
ENV G4PARTICLEXSDATA="/app/geant4/share/Geant4-10.6.3/data/G4PARTICLEXS2.1"
ENV G4PIIDATA="/app/geant4/share/Geant4-10.6.3/data/G4PII1.3"
ENV G4REALSURFACEDATA="/app/geant4/share/Geant4-10.6.3/data/RealSurface2.1.1"
ENV G4SAIDXSDATA="/app/geant4/share/Geant4-10.6.3/data/G4SAIDDATA2.0"
ENV G4ABLADATA="/app/geant4/share/Geant4-10.6.3/data/G4ABLA3.1"
ENV G4INCLDATA="/app/geant4/share/Geant4-10.6.3/data/G4INCL1.0"
ENV G4ENSDFSTATEDATA="/app/geant4/share/Geant4-10.6.3/data/G4ENSDFSTATE2.2"
# Geant4
RUN mkdir -p /app && \
gdown https://drive.google.com/uc?id=15iZ1ad6N16BCgFy7ww9Se4kh8ucW4h9R -O geant4.tar.gz && \
tar -xzf geant4.tar.gz && \
rm geant4.tar.gz && \
mv geant4 /app/geant4 && \
cd /app && \
git clone https://github.com/DeepLearnPhysics/DLPGenerator && \
cd DLPGenerator && \
make &&\
cd /app && \
mkdir -p edep-build /app/edep /source && \
apt-get -y install libyaml-cpp-dev && \
git clone https://github.com/lbl-neutrino/edep-sim && cd edep-sim && git checkout bomb && cd - && \
mv edep-sim /source/edep && \
cd edep-build && \
cmake -DCMAKE_INSTALL_PREFIX=/app/edep -DEDEPSIM_DISPLAY=OFF /source/edep && \
make && make install && \
cd .. && rm -r edep-build && \
mkdir -p /app/lfs && cd /app/lfs && \
wget https://github.com/git-lfs/git-lfs/releases/download/v3.4.1/git-lfs-linux-amd64-v3.4.1.tar.gz &&\
tar -xvf git-lfs-linux-amd64-v3.4.1.tar.gz && \
apt-get install git-lfs && \
cd /app && \
git clone https://github.com/DUNE/larnd-sim.git && cd larnd-sim && git checkout develop && \
git lfs pull && \
export SKIP_CUPY_INSTALL=1 && pip3 install --no-cache-dir . && \
cd /app && git clone -b main https://github.com/larpix/h5flow.git && \
cd h5flow && pip install --no-cache-dir . && \
cd /app && git clone -b main https://github.com/DUNE/ndlar_flow.git && \
cd ndlar_flow && pip install --no-cache-dir . && \
apt-get autoremove -y && apt-get clean -y