-
Notifications
You must be signed in to change notification settings - Fork 5
/
Containerfile.base
47 lines (40 loc) · 1.16 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
FROM debian:bullseye
#FROM gurobi
RUN export DEBIAN_FRONTEND="noninteractive" \
&& apt-get update \
&& apt-get dist-upgrade -y \
&& apt-get install -y \
build-essential \
curl \
gdb \
meson \
ninja-build \
pkg-config \
python3 \
python3-dev \
python3-numpy \
python3-pip \
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
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 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: