Skip to content

Commit cdd0aa9

Browse files
committed
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
1 parent 7e037a9 commit cdd0aa9

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

Dockerfiles/murfey-server

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ RUN apt-get update && \
1717

1818
# Build Murfey and IMOD in a branch image
1919
FROM base as build
20+
21+
# Set up build argumentss for this stage
22+
ARG IMOD_INSTALLER=imod_5.1.9_RHEL8-64_CUDA12.0.sh
23+
2024
COPY ./ /python-murfey/
2125
RUN apt-get update && \
2226
apt-get upgrade -y && \
@@ -35,10 +39,13 @@ RUN apt-get update && \
3539
psycopg2-binary \
3640
&& \
3741
/venv/bin/python -m pip install /python-murfey[server] && \
38-
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 && \
39-
chmod +x imod_5.1.9_RHEL8-64_CUDA12.0.sh && \
42+
if [ ! -f /python-murfey/installers/${IMOD_INSTALLER} ]; then \
43+
echo "IMOD installer not found; downloading..."; \
44+
curl https://bio3d.colorado.edu/imod/AMD64-RHEL5/${IMOD_INSTALLER} > /python-murfey/installers/${IMOD_INSTALLER}; \
45+
fi && \
46+
chmod +x /python-murfey/installers/${IMOD_INSTALLER} && \
4047
mkdir imod && \
41-
./imod_5.1.9_RHEL8-64_CUDA12.0.sh -dir imod -skip -y
48+
/python-murfey/installers/${IMOD_INSTALLER} -dir imod -skip -y
4249

4350

4451
# Transfer completed builds to base image

0 commit comments

Comments
 (0)