-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile.dev
More file actions
80 lines (67 loc) · 2.93 KB
/
Dockerfile.dev
File metadata and controls
80 lines (67 loc) · 2.93 KB
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
FROM ubuntu:22.04
ARG BUILDPLATFORM
ARG TARGETPLATFORM
RUN apt-get update && \
apt-get install -y sudo git vim nano wget curl && \
apt-get upgrade -y && \
apt-get clean
RUN useradd -m -g sudo -s /bin/bash qunfold
RUN echo "qunfold:qunfold" | chpasswd
USER qunfold
WORKDIR /home/qunfold
RUN \
if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
echo "Downloading file for amd64..."; \
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh; \
bash Miniconda3-latest-Linux-x86_64.sh -b -p /home/qunfold/miniconda3; \
rm Miniconda3-latest-Linux-x86_64.sh; \
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
echo "Downloading file for arm64..."; \
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh; \
bash Miniconda3-latest-Linux-aarch64.sh -b -p /home/qunfold/miniconda3; \
rm Miniconda3-latest-Linux-aarch64.sh; \
else \
echo "Unsupported platform: $BUILDPLATFORM"; \
exit 1; \
fi
RUN
ENV PATH=/home/qunfold/miniconda3/bin:$PATH
RUN conda create -n qunfold-env python=3.10.14 -y
USER root
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata
RUN apt-get update && \
apt-get install -y sudo bzip2 libx11-6 libxpm4 libxft2 libxext6 cmake libc6-dev binutils cmake dpkg-dev g++ gcc libssl-dev git libx11-dev libxext-dev libxft-dev libxpm-dev python3 libtbb-dev libgif-dev gfortran libpcre3-dev libglu1-mesa-dev libglew-dev libftgl-dev libfftw3-dev libcfitsio-dev libgraphviz-dev libavahi-compat-libdnssd-dev libldap2-dev python3-dev python3-numpy libxml2-dev libkrb5-dev libgsl-dev qtwebengine5-dev nlohmann-json3-dev libmysqlclient-dev libgl2ps-dev liblzma-dev libxxhash-dev liblz4-dev libzstd-dev && \
apt-get upgrade -y && \
apt-get clean
USER qunfold
RUN /bin/bash -c "source activate qunfold-env && \
mkdir root root-build && \
wget https://root.cern/download/root_v6.34.02.source.tar.gz && \
tar -xf root_v6.34.02.source.tar.gz && \
cd root-build && \
conda install numpy -y && \
cmake -DCMAKE_INSTALL_PREFIX=$HOME/root $HOME/root-6.34.02 && \
cmake --build . --target install -- -j6"
RUN /bin/bash -c "source activate qunfold-env && \
source $HOME/root/bin/thisroot.sh && \
git clone https://gitlab.cern.ch/RooUnfold/RooUnfold && \
cd RooUnfold && \
mkdir build && \
cd build && \
cmake .. && \
make -j4 && \
conda install -c conda-forge libstdcxx-ng=12 -y"
RUN git clone https://github.com/Quantum4HEP/QUnfold.git
WORKDIR /home/qunfold/QUnfold
RUN /bin/bash -c "source activate qunfold-env && \
pip install -e .[gurobi] && \
pip install jupyterlab"
RUN conda clean -a -y
WORKDIR /home/qunfold
RUN /bin/bash -c "rm -r /home/qunfold/root-build && \
rm -r /home/qunfold/root-6.34.02 && \
rm /home/qunfold/root_v6.34.02.source.tar.gz"
RUN echo "source activate qunfold-env" >> /home/qunfold/.bashrc
RUN echo "source /home/qunfold/root/bin/thisroot.sh" >> /home/qunfold/.bashrc
RUN echo "source RooUnfold/build/setup.sh" >> /home/qunfold/.bashrc
CMD ["/bin/bash"]