-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
49 lines (42 loc) · 1.25 KB
/
Copy pathDockerfile
File metadata and controls
49 lines (42 loc) · 1.25 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 python:3.12-slim
# System deps:
# - LaTeX: matplotlib usetex for figure rendering
# - build-essential, pkg-config, curl: building dag-eg (Rust)
# - coinor-libcbc-dev: CBC ILP solver linked by dag-eg
RUN apt-get update && apt-get install -y --no-install-recommends \
texlive-latex-base \
texlive-latex-extra \
texlive-fonts-extra \
texlive-fonts-recommended \
texlive-plain-generic \
cm-super \
dvipng \
fonts-linuxlibertine \
build-essential \
pkg-config \
curl \
ca-certificates \
coinor-libcbc-dev \
zlib1g-dev \
libbz2-dev \
liblapack-dev \
libblas-dev \
gfortran \
&& rm -rf /var/lib/apt/lists/*
# Rust toolchain (for building dag-eg)
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
| sh -s -- -y --default-toolchain stable --profile minimal
WORKDIR /artifact
# Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy artifact
COPY . .
# Build dag-eg Rust binary (links against libCbcSolver)
RUN cd dag-eg && cargo build --release && \
ls -la target/release/quasar
# Default: interactive shell
CMD ["bash"]