-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile
More file actions
49 lines (43 loc) · 1.1 KB
/
Containerfile
File metadata and controls
49 lines (43 loc) · 1.1 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
FROM docker.io/rust:1.84.0-slim-bookworm
# Update and upgrade all base image packages, then install required dependencies
RUN apt-get update && apt-get -y upgrade
RUN apt-get install -y \
gcc \
g++ \
gfortran \
git \
patch \
wget \
pkg-config \
liblapack-dev \
libmetis-dev \
make
# Build MUMPS
WORKDIR /usr/local/src
RUN git clone https://github.com/coin-or-tools/ThirdParty-Mumps.git
WORKDIR /usr/local/src/ThirdParty-Mumps
RUN ./get.Mumps
RUN mkdir build
WORKDIR /usr/local/src/ThirdParty-Mumps/build
RUN ../configure
RUN make -j6
RUN make -j6 install
# Build IPOPT
WORKDIR /usr/local/src
RUN git clone https://github.com/coin-or/Ipopt.git
WORKDIR /usr/local/src/Ipopt
RUN mkdir build
WORKDIR /usr/local/src/Ipopt/build
RUN ../configure
RUN make -j6
RUN make -j6 test
RUN make -j6 install
# Configure dynamic linker run-time bindings
RUN ldconfig
# Remove source code for IPOPT and its dependencies
WORKDIR /usr/local/src
RUN rm -rf ThirdParty-Mumps Ipopt
# Create user and home directory for mounting volume from host
RUN useradd -m builder
USER builder
WORKDIR /home/builder