From 710b639fb80b0f49274f775af1dff84a1e1c95e8 Mon Sep 17 00:00:00 2001 From: Eu Pin Tien Date: Wed, 10 Dec 2025 13:38:59 +0000 Subject: [PATCH 1/4] Added '.ruff_cache/' to '.gitignore' file list --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 2dae531ea..b15c89439 100644 --- a/.gitignore +++ b/.gitignore @@ -106,3 +106,6 @@ ENV/ # mypy .mypy_cache/ + +# ruff +.ruff_cache/ From 3d0ce72a4dae7d3a66911b3f1f7eac862a4b63a3 Mon Sep 17 00:00:00 2001 From: Eu Pin Tien Date: Wed, 10 Dec 2025 13:40:26 +0000 Subject: [PATCH 2/4] Added '.dockgerignore' file to repo so that only essential files and folders are copied when building Docker image --- .dockerignore | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..5e9d3088c --- /dev/null +++ b/.dockerignore @@ -0,0 +1,11 @@ +# Ignore everything by default +** + +# Whitelist only the files and folders needed for building +!Dockerfiles/ +!src/ +!pyproject.toml +!setup.py +!LICENSE +!MANIFEST.in +!README.md From 7e037a96f821d881b5a4a247983b9fe88ad33956 Mon Sep 17 00:00:00 2001 From: Eu Pin Tien Date: Wed, 10 Dec 2025 14:11:14 +0000 Subject: [PATCH 3/4] Add folder to repo to store offline installers in when building Dockerfiles that require installers to be downloaded --- .dockerignore | 1 + installers/README.md | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 installers/README.md diff --git a/.dockerignore b/.dockerignore index 5e9d3088c..223f7f8d6 100644 --- a/.dockerignore +++ b/.dockerignore @@ -3,6 +3,7 @@ # Whitelist only the files and folders needed for building !Dockerfiles/ +!installers/ !src/ !pyproject.toml !setup.py diff --git a/installers/README.md b/installers/README.md new file mode 100644 index 000000000..c0cfeab6f --- /dev/null +++ b/installers/README.md @@ -0,0 +1,2 @@ +This is placeholder folder in which installation files for the Docker containers can be placed. +The Dockerfiles will first check to see if the desired file is located here before attempting to download it. From cdd0aa9e306115252048109270b9d6174da334e9 Mon Sep 17 00:00:00 2001 From: Eu Pin Tien Date: Wed, 10 Dec 2025 14:12:09 +0000 Subject: [PATCH 4/4] Updated 'murfey-server' Dockerfile logic: * Use build argument variable to store IMOD installer name * Check that an offline installer is present in the 'installers' folder before attempting a download --- Dockerfiles/murfey-server | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Dockerfiles/murfey-server b/Dockerfiles/murfey-server index 3418124e7..b44a1b6d1 100644 --- a/Dockerfiles/murfey-server +++ b/Dockerfiles/murfey-server @@ -17,6 +17,10 @@ RUN apt-get update && \ # Build Murfey and IMOD in a branch image FROM base as build + +# Set up build argumentss for this stage +ARG IMOD_INSTALLER=imod_5.1.9_RHEL8-64_CUDA12.0.sh + COPY ./ /python-murfey/ RUN apt-get update && \ apt-get upgrade -y && \ @@ -35,10 +39,13 @@ RUN apt-get update && \ psycopg2-binary \ && \ /venv/bin/python -m pip install /python-murfey[server] && \ - curl https://bio3d.colorado.edu/imod/AMD64-RHEL5/imod_5.1.9_RHEL8-64_CUDA12.0.sh > imod_5.1.9_RHEL8-64_CUDA12.0.sh && \ - chmod +x imod_5.1.9_RHEL8-64_CUDA12.0.sh && \ + if [ ! -f /python-murfey/installers/${IMOD_INSTALLER} ]; then \ + echo "IMOD installer not found; downloading..."; \ + curl https://bio3d.colorado.edu/imod/AMD64-RHEL5/${IMOD_INSTALLER} > /python-murfey/installers/${IMOD_INSTALLER}; \ + fi && \ + chmod +x /python-murfey/installers/${IMOD_INSTALLER} && \ mkdir imod && \ - ./imod_5.1.9_RHEL8-64_CUDA12.0.sh -dir imod -skip -y + /python-murfey/installers/${IMOD_INSTALLER} -dir imod -skip -y # Transfer completed builds to base image