2
2
#
3
3
# MIT License
4
4
#
5
- # Copyright (c) 2023 The NiPreps Developers
5
+ # Copyright (c) The NiPreps Developers
6
6
#
7
7
# Permission is hereby granted, free of charge, to any person obtaining a copy
8
8
# of this software and associated documentation files (the "Software"), to deal
23
23
# SOFTWARE.
24
24
25
25
# Ubuntu 22.04 LTS - Jammy
26
- ARG BASE_IMAGE=ubuntu:jammy-20230308
26
+ ARG BASE_IMAGE=ubuntu:jammy-20240125
27
27
28
28
#
29
- # sMRIPrep wheel
29
+ # Build wheel
30
30
#
31
31
FROM python:slim AS src
32
32
RUN pip install build
33
33
RUN apt-get update && \
34
34
apt-get install -y --no-install-recommends git
35
- COPY . /src/smriprep
36
- RUN python -m build /src/smriprep
35
+ COPY . /src
36
+ RUN python -m build /src
37
37
38
38
#
39
39
# Download stages
40
40
#
41
41
42
42
# Utilities for downloading packages
43
43
FROM ${BASE_IMAGE} as downloader
44
+ # Bump the date to current to refresh curl/certificates/etc
45
+ RUN echo "2023.07.20"
44
46
RUN apt-get update && \
45
47
apt-get install -y --no-install-recommends \
46
48
binutils \
@@ -67,19 +69,30 @@ RUN mkdir /opt/workbench && \
67
69
68
70
# Micromamba
69
71
FROM downloader as micromamba
72
+
73
+ # Install a C compiler to build extensions when needed.
74
+ # traits<6.4 wheels are not available for Python 3.11+, but build easily.
75
+ RUN apt-get update && \
76
+ apt-get install -y --no-install-recommends build-essential && \
77
+ apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
78
+
70
79
WORKDIR /
71
80
# Bump the date to current to force update micromamba
72
- RUN echo "2023.04.05 "
81
+ RUN echo "2024.03.08 "
73
82
RUN curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj bin/micromamba
74
83
75
84
ENV MAMBA_ROOT_PREFIX="/opt/conda"
76
85
COPY env.yml /tmp/env.yml
77
86
COPY requirements.txt /tmp/requirements.txt
87
+ WORKDIR /tmp
78
88
RUN micromamba create -y -f /tmp/env.yml && \
79
89
micromamba clean -y -a
80
90
81
- ENV PATH="/opt/conda/envs/smriprep/bin:$PATH"
82
- RUN /opt/conda/envs/smriprep/bin/npm install -g svgo@^3.0 bids-validator@^1.13 && \
91
+ # UV_USE_IO_URING for apparent race-condition (https://github.com/nodejs/node/issues/48444)
92
+ # Check if this is still necessary when updating the base image.
93
+ ENV PATH="/opt/conda/envs/smriprep/bin:$PATH" \
94
+ UV_USE_IO_URING=0
95
+ RUN npm install -g svgo@^3.2.0 bids-validator@^1.14.0 && \
83
96
rm -r ~/.npm
84
97
85
98
#
@@ -179,7 +192,7 @@ ENV MKL_NUM_THREADS=1 \
179
192
OMP_NUM_THREADS=1
180
193
181
194
# Installing SMRIPREP
182
- COPY --from=src /src/smriprep/ dist/*.whl .
195
+ COPY --from=src /src/dist/*.whl .
183
196
RUN pip install --no-cache-dir $( ls *.whl )[telemetry,test]
184
197
185
198
RUN find $HOME -type d -exec chmod go=u {} + && \
0 commit comments