Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,12 @@
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# FreeSurfer 7.4.1
# FROM downloader AS freesurfer
# COPY docker/files/freesurfer7.4.1-exclude.txt /usr/local/etc/freesurfer7.4.1-exclude.txt
# RUN curl -sSL https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/7.4.1/freesurfer-linux-ubuntu22_amd64-7.4.1.tar.gz \
# | tar zxv --no-same-owner -C /opt --exclude-from=/usr/local/etc/freesurfer7.4.1-exclude.txt
FROM downloader AS freesurfer
COPY docker/files/freesurfer7.4.1-exclude.txt /tmp/freesurfer7.4.1-exclude.txt
RUN curl -sSL https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/7.4.1/freesurfer-linux-ubuntu22_amd64-7.4.1.tar.gz -o /tmp/freesurfer.tar.gz \
&& tar -xzf /tmp/freesurfer.tar.gz --no-same-owner -C /opt --exclude-from=/tmp/freesurfer7.4.1-exclude.txt \
&& rm -rf /tmp/freesurfer.tar.gz /tmp/freesurfer7.4.1-exclude.txt \
&& rm -rf /opt/freesurfer/{docs,subjects/bert,subjects/cvs_avg35,subjects/cvs_avg35_inMNI152,subjects/fsaverage3,subjects/fsaverage4,subjects/fsaverage_sym,subjects/lh.EC_average,subjects/rh.EC_average,subjects/sample-001.mgz,subjects/sample-002.mgz,subjects/V1_average,trctrain,matlab,mni-1.4,mni/bin,mni/include,mni/share,lib/qt,lib/vtk}

# AFNI
FROM downloader AS afni
Expand Down Expand Up @@ -173,7 +175,7 @@
&& ldconfig

# Install files from stages
COPY --from=freesurfer/freesurfer:7.4.1 /usr/local/freesurfer /opt/freesurfer
COPY --from=freesurfer /opt/freesurfer /opt/freesurfer
COPY --from=afni /opt/afni-latest /opt/afni-latest
COPY --from=petpvc /usr/local /usr/local

Expand Down Expand Up @@ -202,7 +204,7 @@
# Create a shared $HOME directory
RUN useradd -m -s /bin/bash -G users petprep
WORKDIR /home/petprep
ENV HOME="/home/petprep" \

Check warning on line 207 in Dockerfile

View workflow job for this annotation

GitHub Actions / build-container

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$LD_LIBRARY_PATH' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/
LD_LIBRARY_PATH="/usr/lib/x86_64-linux-gnu:${LD_LIBRARY_PATH:-}"

COPY --from=micromamba /bin/micromamba /bin/micromamba
Expand All @@ -211,7 +213,7 @@
ENV MAMBA_ROOT_PREFIX="/opt/conda"
RUN micromamba shell init -s bash && \
echo "micromamba activate petprep" >> $HOME/.bashrc
ENV PATH="/opt/conda/envs/petprep/bin:$PATH" \

Check warning on line 216 in Dockerfile

View workflow job for this annotation

GitHub Actions / build-container

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CPATH' (did you mean $PATH?) More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/
CPATH="/opt/conda/envs/petprep/include:${CPATH:-}" \
LD_LIBRARY_PATH="/opt/conda/envs/petprep/lib:$LD_LIBRARY_PATH"

Expand Down