-
Notifications
You must be signed in to change notification settings - Fork 6
/
Containerfile.base
58 lines (50 loc) · 1.5 KB
/
Containerfile.base
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
FROM debian:bookworm
#FROM gurobi
RUN export DEBIAN_FRONTEND="noninteractive" \
&& apt-get update \
&& apt-get dist-upgrade -y \
&& apt-get install -y \
build-essential \
cmake \
curl \
gdb \
meson \
ninja-build \
pkg-config \
python3 \
python3-dev \
python3-numpy \
python3-pip \
python3-pulp \
sudo \
swig \
vim-nox \
&& find /var/cache/apt -mindepth 1 -delete \
&& find /var/lib/apt/lists -mindepth 1 -delete
# In Debian the sysconfig Python module is reporting the wrong paths. Instead
# of site-packages, Debian uses dist-packages. We fix this by creating a
# symlink here.
RUN cd /usr/local/lib/python3.* \
&& ln -nsf dist-packages site-packages \
&& cd .. \
&& ln -s python3.* python3
RUN useradd -ms /bin/bash user \
&& echo 'user ALL=(ALL) NOPASSWD: ALL' >/etc/sudoers.d/user
USER user
WORKDIR /home/user
ARG BUILDTYPE=debugoptimized
# Fetch and install KaMIS dependency.
RUN curl -LOJ 'https://github.com/KarlsruheMIS/KaMIS/archive/3d94c3bc53de231d5d9fab6c8a9b7556abfcf882.tar.gz' \
&& tar -xf KaMIS-*.tar.gz \
&& cd KaMIS-*/ \
&& ./compile_withcmake.sh \
&& sudo install -m 0755 -t /usr/local/bin deploy/*
# Fetch and install libqpbo dependency.
RUN curl -LOJ 'https://github.com/fgrsnau/libqpbo/archive/v1.4.1.tar.gz' \
&& tar -xf libqpbo-*.tar.gz \
&& mkdir libqpbo-build \
&& cd libqpbo-build \
&& meson setup -Db_ndebug=if-release -Dbuildtype=${BUILDTYPE} ../libqpbo-*/ \
&& ninja \
&& sudo meson install
# vim: set ts=8 sts=4 sw=4 et ft=dockerfile: