Skip to content

Commit

Permalink
Merge pull request #47 from mgxd/rf/dockerfile-niftyreg
Browse files Browse the repository at this point in the history
FIX: Remove legacy installation of NiftyReg
  • Loading branch information
mgxd authored Apr 21, 2021
2 parents 2bb12f4 + 02f2e3e commit 3572d71
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,3 @@
FROM ubuntu:xenial-20200114 as niftyreg-build

ARG DEBIAN_FRONTEND="noninteractive"
ENV LANG="en_US.UTF-8" \
LC_ALL="en_US.UTF-8"
RUN apt update && apt-get install -y --no-install-recommends \
bzip2 \
ca-certificates \
cmake \
gcc \
g++ \
build-essential \
make \
unzip \
wget \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

WORKDIR /opt
RUN wget -O niftyreg.tar.gz 'https://github.com/KCL-BMEIS/niftyreg/archive/CBSI.tar.gz' \
&& tar xzfv niftyreg.tar.gz \
&& rm niftyreg.tar.gz

# compile niftyreg
WORKDIR /opt/niftyreg-CBSI/niftyreg-build
RUN mkdir -p ../../niftyreg \
&& cmake -DCMAKE_INSTALL_PREFIX=/opt/niftyreg -DBUILD_TESTING=OFF .. \
&& make -j8 \
&& make install


# Use Ubuntu 16.04 LTS
FROM ubuntu:xenial-20200114 as main

Expand Down Expand Up @@ -152,11 +121,6 @@ RUN apt-get update -y && \
convert3d && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# copy niftyreg from previous build stage
COPY --from=niftyreg-build /opt/niftyreg /opt/niftyreg
ENV PATH="/opt/niftyreg/bin:${PATH}" \
LD_LIBRARY_PATH="/opt/niftyreg/lib:${LD_LIBRARY_PATH}"

# Create a shared $HOME directory
RUN useradd -m -s /bin/bash -G users nibabies
WORKDIR /home/nibabies
Expand Down

0 comments on commit 3572d71

Please sign in to comment.