Skip to content

Commit

Permalink
Bundling Matlab MCR into base freesurfer image
Browse files Browse the repository at this point in the history
  • Loading branch information
maouw committed Dec 27, 2023
1 parent 1f3f0ea commit 395fe68
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 37 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/apptainer-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,11 @@ jobs:
- name: Build Container
run: |
set -euxo pipefail
export APPTAINER_CACHE_DIR="${SETUP_DOWNLOADS_DIR}/apptainer-cache"
mkdir -p sif
pushd "${DEF_DIR}"
echo "Building \"${IMAGE_NAME}.sif\""
touch .build-arg-file
apptainer build --warn-unused-build-args --fix-perms --force --build-arg-file .build-arg-file ../../sif/"${IMAGE_NAME}.sif" Singularity || { echo "Failed to build \"${IMAGE_NAME}.sif\""; exit 1; }
apptainer build --warn-unused-build-args --disable-cache --fix-perms --force --build-arg-file .build-arg-file ../../sif/"${IMAGE_NAME}.sif" Singularity || { echo "Failed to build \"${IMAGE_NAME}.sif\""; exit 1; }
echo "Built \"${IMAGE_NAME}.sif\""
popd
- name: Login and Deploy Container
Expand Down
34 changes: 0 additions & 34 deletions def/hyakvnc-freesurfer-matlab-ubuntu22.04/Singularity

This file was deleted.

9 changes: 8 additions & 1 deletion def/hyakvnc-freesurfer-ubuntu22.04/Singularity
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ From: {{BOOTSTRAP_FROM_REPO}}/{{BOOTSTRAP_FROM_IMAGE}}{{BOOTSTRAP_FROM_SUFFIX}}
SETUP_DOWNLOADS_DIR=../../.setup-downloads
RECON_ALL_CLINICAL_HASH=ecdf46e
RECON_ALL_CLINICAL_URL=https://raw.githubusercontent.com/freesurfer/freesurfer/{{RECON_ALL_CLINICAL_HASH}}/recon_all_clinical/recon-all-clinical.sh
MCR_VERSION=R2014b

%help
This is an Apptainer container of Ubuntu 22.04 with FreeSurfer installed. It is designed to be run on the Hyak cluster at the University of Washington with the hyakvnc script.
Expand Down Expand Up @@ -53,6 +54,13 @@ This is an Apptainer container of Ubuntu 22.04 with FreeSurfer installed. It is
"{{RECON_ALL_CLINICAL_URL}}" || { echo "warning: curl failed!" >&2; exit 1; }
chmod a+x /usr/local/freesurfer/{{FREESURFER_VERSION}}/bin/recon-all-clinical.sh

if [[ -n "{{ MCR_VERSION }}" ]; then
# Install MCR dependencies:
apt-get install -y libxt-dev libxext-dev libncurses5

# Install MCR:
fs_install_mcr "{{MCR_VERSION}}"
fi
# Clean up packages:
apt-get clean -y -qq && apt-get -y autoremove && rm -rf /var/lib/apt/lists/*

Expand Down Expand Up @@ -81,4 +89,3 @@ This is an Apptainer container of Ubuntu 22.04 with FreeSurfer installed. It is
edu.uw.hyakvnc.container.resources.recommends.cpus 4
edu.uw.hyakvnc.container.resources.requires.cpus 1
edu.uw.hyakvnc.container.resources.suggests.gpus 1

0 comments on commit 395fe68

Please sign in to comment.