Skip to content

Commit c150420

Browse files
committed
DKR: Add MCRIBS to build
1 parent 734c5b4 commit c150420

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

Dockerfile

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ RUN apt-get update && \
66
COPY . /src/nibabies
77
RUN python -m build /src/nibabies
88

9-
# Ubuntu 20.04 LTS
9+
# Python to support legacy MCRIBS
10+
FROM python:3.6.15-slim as pyenv
11+
RUN pip install --no-cache-dir numpy nibabel scipy pandas numexpr contextlib2 \
12+
&& cp /usr/lib/x86_64-linux-gnu/libffi.so.7* /usr/local/lib
13+
14+
# Ubuntu 22.04 LTS
1015
FROM ubuntu:jammy-20221130
1116
ENV DEBIAN_FRONTEND="noninteractive" \
1217
LANG="en_US.UTF-8" \
@@ -264,6 +269,23 @@ RUN conda install -y -n base \
264269
&& rm -rf ~/.conda ~/.cache/pip/*; sync \
265270
&& ldconfig
266271

272+
# MCRIBS
273+
COPY --from=nipreps/mcribs@sha256:6c7a8dedd61d0ead8c7c4a57ab158928c1c1d787d87dae33ab7ee43226fb1e0f /opt/MCRIBS/ /opt/MCRIBS
274+
RUN apt-get update && apt-get install -y --no-install-recommends \
275+
libboost-dev \
276+
libeigen3-dev \
277+
libflann-dev \
278+
libgl1-mesa-dev \
279+
libglu1-mesa-dev \
280+
libssl-dev \
281+
libxt-dev \
282+
zlib1g-dev \
283+
&& rm -rf /var/lib/apt/lists/*
284+
ENV PATH="/opt/MCRIBS/bin:/opt/MCRIBS/MIRTK/MIRTK-install/bin:/opt/MCRIBS/MIRTK/MIRTK-install/lib/tools:${PATH}" \
285+
LD_LIBRARY_PATH="/opt/MCRIBS/lib:/opt/MCRIBS/ITK/ITK-install/lib:/opt/MCRIBS/VTK/VTK-install/lib:/opt/MCRIBS/MIRTK/MIRTK-install/lib:${LD_LIBRARY_PATH}" \
286+
MCRIBS_HOME="/opt/MCRIBS" \
287+
PYTHONPATH="/opt/MCRIBS/lib/python:$PYTHONPATH"
288+
267289
# Precaching atlases
268290
COPY scripts/fetch_templates.py fetch_templates.py
269291
RUN ${CONDA_PYTHON} fetch_templates.py && \
@@ -290,4 +312,6 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
290312
org.label-schema.version=$VERSION \
291313
org.label-schema.schema-version="1.0"
292314

315+
COPY --from=pyenv /usr/local/lib/ /usr/local/lib/
316+
ENV LD_LIBRARY_PATH="/usr/local/lib:${LD_LIBRARY_PATH}"
293317
ENTRYPOINT ["/opt/conda/bin/nibabies"]

0 commit comments

Comments
 (0)