Skip to content

Commit ab2b3b3

Browse files
authored
Update supporting files (#712)
Add Ruff cache to the .gitignore file list. Introduce a .dockerignore file list to prevent copying of non-essential files when building Docker containers. Add an empty installers folder in repo for developers to store offline installers in when building Docker containers. Add logic to murfey-server Dockerfile to check for an IMOD installation file before attempting to download it.
1 parent 02ec191 commit ab2b3b3

4 files changed

Lines changed: 27 additions & 3 deletions

File tree

.dockerignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Ignore everything by default
2+
**
3+
4+
# Whitelist only the files and folders needed for building
5+
!Dockerfiles/
6+
!installers/
7+
!src/
8+
!pyproject.toml
9+
!setup.py
10+
!LICENSE
11+
!MANIFEST.in
12+
!README.md

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,6 @@ ENV/
106106

107107
# mypy
108108
.mypy_cache/
109+
110+
# ruff
111+
.ruff_cache/

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

installers/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
This is placeholder folder in which installation files for the Docker containers can be placed.
2+
The Dockerfiles will first check to see if the desired file is located here before attempting to download it.

0 commit comments

Comments
 (0)