-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (33 loc) · 1.15 KB
/
Dockerfile
File metadata and controls
42 lines (33 loc) · 1.15 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
# Use the latest Ubuntu LTS as base
FROM ubuntu:24.04
LABEL maintainer="paul.hodgkinson@durham.ac.uk"
ENV DEBIAN_FRONTEND=noninteractive
# Install dependencies
RUN apt-get update && apt-get install -y \
build-essential \
g++ \
cmake \
git \
libopenblas-dev \
&& rm -rf /var/lib/apt/lists/*
# Optional: install Minuit2
WORKDIR /opt
RUN git clone https://github.com/GooFit/Minuit2.git Minuit2-master && \
mkdir Minuit2-master/build && \
cd Minuit2-master/build && \
cmake .. && \
make && make install
# sed -i '/link_libraries/s/$/\nlink_libraries("-lstdc++")/' ../CMakeLists.txt && \
# Create working directory
WORKDIR /opt/libcmatrix
# Copy libcmatrix source code into container
# (Assumes you will mount or COPY the source code into this directory)
COPY . .
# Configure with OpenBLAS and Minuit
RUN CPPFLAGS=-I/opt/Minuit2-master/inc LDFLAGS=-I/opt/Minuit2-master/build/lib ./configure --with-openblas -with-minuit && make
# Optional: build test programs
# WORKDIR /opt/libcmatrix/test
# RUN make all || true # Allow some test programs to fail
# Set default working directory
WORKDIR /opt/libcmatrix
CMD ["/bin/bash"]