-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile.dev
60 lines (48 loc) · 1.75 KB
/
Dockerfile.dev
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
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 apt-get update && \
apt-get install -y sudo bzip2 libx11-6 libxpm4 libxft2 libxext6 cmake libc6-dev && \
apt-get upgrade -y && \
apt-get clean
USER qunfold
RUN /bin/bash -c "source activate qunfold-env && \
conda install -c conda-forge root -y"
RUN /bin/bash -c "source activate qunfold-env && \
pip install git+https://gitlab.cern.ch/RooUnfold/RooUnfold"
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 echo "source activate qunfold-env" >> /home/qunfold/.bashrc
CMD ["/bin/bash"]