Skip to content

Commit 5b46125

Browse files
committed
MNT: Bring Dockerfile into line with fmriprep
1 parent 66314c2 commit 5b46125

File tree

2 files changed

+18
-43
lines changed

2 files changed

+18
-43
lines changed

.dockerignore

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,47 +8,18 @@ build/**/*
88
build
99
dist/**/*
1010
dist
11-
docs/**/*
12-
docs
1311
sdcflows.egg-info/**/*
1412
sdcflows.egg-info
1513
.eggs/**/*
1614
.eggs
1715

18-
# housekeeping tools
19-
get_version.py
20-
update_changes.sh
21-
tox.ini
22-
2316
# pip installs
2417
src/**/*
2518
src/
2619

27-
# git
28-
.gitattributes
29-
.gitignore
30-
.github/**/*
31-
.github
32-
.git/**/*
33-
.git
34-
3520
# other
3621
work/**/*
3722
work
3823
out/**/*
3924
out/
40-
tools/**/*
41-
tools
4225
.DS_Store
43-
44-
# CI, etc.
45-
.circleci/**/*
46-
.circleci
47-
.codecov.yml
48-
.coveragerc
49-
.pep8speaks.yml
50-
.readthedocs.yml
51-
.travis.yml
52-
.zenodo.json
53-
CONTRIBUTING.md
54-

Dockerfile

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,15 @@
2222
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2323
# SOFTWARE.
2424

25-
# Use Ubuntu 20.04 LTS
26-
FROM ubuntu:focal-20210416
25+
FROM python:slim AS src
26+
RUN pip install build
27+
RUN apt-get update && \
28+
apt-get install -y --no-install-recommends git
29+
COPY . /src/sdcflows
30+
RUN python -m build /src/sdcflows
31+
32+
# Use Ubuntu 22.04 LTS
33+
FROM ubuntu:jammy-20221130
2734

2835
# Prepare environment
2936
RUN apt-get update && \
@@ -35,8 +42,10 @@ RUN apt-get update && \
3542
ca-certificates \
3643
curl \
3744
git \
45+
gnupg \
3846
libtool \
3947
lsb-release \
48+
netbase \
4049
pkg-config \
4150
unzip \
4251
xvfb && \
@@ -138,33 +147,33 @@ RUN echo "Downloading Convert3D ..." \
138147
ENV C3DPATH="/opt/convert3d-1.0.0" \
139148
PATH="/opt/convert3d-1.0.0/bin:$PATH"
140149

150+
# Configure PPA for libpng12
151+
RUN GNUPGHOME=/tmp gpg --keyserver hkps://keyserver.ubuntu.com --no-default-keyring --keyring /usr/share/keyrings/linuxuprising.gpg --recv 0xEA8CACC073C3DB2A \
152+
&& echo "deb [signed-by=/usr/share/keyrings/linuxuprising.gpg] https://ppa.launchpadcontent.net/linuxuprising/libpng12/ubuntu jammy main" > /etc/apt/sources.list.d/linuxuprising.list
141153
# AFNI latest (neurodocker build)
142154
RUN apt-get update -qq \
143155
&& apt-get install -y -q --no-install-recommends \
144-
apt-utils \
145156
ed \
146157
gsl-bin \
147158
libglib2.0-0 \
148159
libglu1-mesa-dev \
149160
libglw1-mesa \
150161
libgomp1 \
151162
libjpeg62 \
163+
libpng12-0 \
152164
libxm4 \
153165
netpbm \
154166
tcsh \
155167
xfonts-base \
156168
xvfb \
157169
&& apt-get clean \
158170
&& rm -rf /var/lib/apt/lists/* \
159-
&& curl -sSL --retry 5 -o /tmp/multiarch.deb http://archive.ubuntu.com/ubuntu/pool/main/g/glibc/multiarch-support_2.27-3ubuntu1.2_amd64.deb \
171+
&& curl -sSL --retry 5 -o /tmp/multiarch.deb http://archive.ubuntu.com/ubuntu/pool/main/g/glibc/multiarch-support_2.27-3ubuntu1.5_amd64.deb \
160172
&& dpkg -i /tmp/multiarch.deb \
161173
&& rm /tmp/multiarch.deb \
162174
&& curl -sSL --retry 5 -o /tmp/libxp6.deb http://mirrors.kernel.org/debian/pool/main/libx/libxp/libxp6_1.0.2-2_amd64.deb \
163175
&& dpkg -i /tmp/libxp6.deb \
164176
&& rm /tmp/libxp6.deb \
165-
&& curl -sSL --retry 5 -o /tmp/libpng.deb http://snapshot.debian.org/archive/debian-security/20160113T213056Z/pool/updates/main/libp/libpng/libpng12-0_1.2.49-1%2Bdeb7u2_amd64.deb \
166-
&& dpkg -i /tmp/libpng.deb \
167-
&& rm /tmp/libpng.deb \
168177
&& apt-get install -f \
169178
&& apt-get clean \
170179
&& rm -rf /var/lib/apt/lists/* \
@@ -242,13 +251,8 @@ COPY .docker/files/nipype.cfg $HOME/.nipype/nipype.cfg
242251
WORKDIR /src/sdcflows
243252

244253
# Installing SDCFlows
245-
COPY . /src/sdcflows
246-
# Force static versioning within container
247-
ARG VERSION
248-
ENV SETUPTOOLS_SCM_PRETEND_VERSION=${VERSION}
249-
RUN sed -i "s/fallback_version\s=\s\"0\.0\"/fallback_version = \"${VERSION}\"/g" pyproject.toml && \
250-
pip install --no-cache-dir .[all] && \
251-
rm -rf $HOME/.cache/pip
254+
COPY --from=src /src/sdcflows/dist/*.whl .
255+
RUN /opt/conda/bin/python -m pip install --no-cache-dir $( ls *.whl )[all]
252256

253257
RUN find $HOME -type d -exec chmod go=u {} + && \
254258
find $HOME -type f -exec chmod go=u {} +

0 commit comments

Comments
 (0)