Skip to content

Commit bdf67bc

Browse files
authored
Create CLEM PNG thumbnails for PATo (#221)
* Added 'images plugin' function to convert TIFF to PNG * Added additional step in CLEM image processing workflows to generate colourised PNG thumbnails for PATo visualisation * Added '.dockerignore' file and an empty 'installers' folder to store offline installers in * Update 'cryoemservices_cpu' Dockerfile to look for local IMOD installer for a specified version before attempting to download it
1 parent 2226cef commit bdf67bc

26 files changed

+557
-52
lines changed

.dockerignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
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+
!README.md

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ venv.bak/
129129
.dmypy.json
130130
dmypy.json
131131

132+
# ruff
133+
.ruff_cache/
134+
132135
# Pyre type checker
133136
.pyre/
134137

Dockerfiles/cryoemservices_cpu

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

1313
# Build CryoEM Services, pipeliner, and IMOD in a branch image
1414
FROM base as build
15+
16+
# Set up build arguments for this stage
17+
ARG IMOD_INSTALLER=imod_5.1.9_RHEL8-64_CUDA12.0.sh
18+
1519
COPY ./ /cryoem-services/
1620
RUN apt-get update && \
1721
apt-get upgrade -y && \
@@ -31,10 +35,13 @@ RUN apt-get update && \
3135
/cryoem-services \
3236
http://gitlab.com/stephen-riggs/ccpem-pipeliner/-/archive/diamond_tomo/ccpem-pipeliner-diamond_tomo.zip \
3337
&& \
34-
curl https://bio3d.colorado.edu/imod/AMD64-RHEL5/imod_5.1.0_RHEL8-64_CUDA12.0.sh > imod_5.1.0_RHEL8-64_CUDA12.0.sh && \
35-
chmod +x imod_5.1.0_RHEL8-64_CUDA12.0.sh && \
38+
if [ ! -f /cryoem-services/installers/${IMOD_INSTALLER} ]; then \
39+
echo "IMOD installer not found; downloading..."; \
40+
curl https://bio3d.colorado.edu/imod/AMD64-RHEL5/${IMOD_INSTALLER} > /cryoem-services/installers/${IMOD_INSTALLER}; \
41+
fi && \
42+
chmod +x /cryoem-services/installers/${IMOD_INSTALLER} && \
3643
mkdir imod && \
37-
./imod_5.1.0_RHEL8-64_CUDA12.0.sh -dir imod -skip -y
44+
/cryoem-services/installers/${IMOD_INSTALLER} -dir imod -skip -y
3845

3946
# Transfer completed build to base image
4047
FROM base

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.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ torch = [
117117
"picked_particles" = "cryoemservices.services.images_plugins:picked_particles"
118118
"picked_particles_3d_apng" = "cryoemservices.services.images_plugins:picked_particles_3d_apng"
119119
"picked_particles_3d_central_slice" = "cryoemservices.services.images_plugins:picked_particles_3d_central_slice"
120+
"tiff_to_apng" = "cryoemservices.services.images_plugins:tiff_to_apng"
120121
"tilt_series_alignment" = "cryoemservices.services.images_plugins:tilt_series_alignment"
121122
[project.entry-points."cryoemservices.services.process_recipe.filters"]
122123
ispyb = "cryoemservices.util.process_recipe_tools:ispyb_filter"

recipes/clem-align-and-merge-wrapper.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"align_across": "{align_across}"
1111
},
1212
"output": {
13-
"murfey_feedback": 2
13+
"murfey_feedback": 2,
14+
"images": 3
1415
},
1516
"parameters": {
1617
"cluster": {
@@ -46,5 +47,9 @@
4647
"queue": "{feedback_queue}",
4748
"service": "Murfey"
4849
},
50+
"3": {
51+
"queue": "images",
52+
"service": "Images"
53+
},
4954
"start": [[1, []]]
5055
}

recipes/clem-align-and-merge.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"align_across": "{align_across}"
1111
},
1212
"output": {
13-
"murfey_feedback": 2
13+
"murfey_feedback": 2,
14+
"images": 3
1415
},
1516
"queue": "cluster.submission",
1617
"service": "ALIGN-AND-MERGE"
@@ -22,5 +23,9 @@
2223
"queue": "{feedback_queue}",
2324
"service": "Murfey"
2425
},
26+
"3": {
27+
"queue": "images",
28+
"service": "Images"
29+
},
2530
"start": [[1, []]]
2631
}

recipes/clem-lif-to-stack-wrapper.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"root_folder": "{root_folder}"
66
},
77
"output": {
8-
"murfey_feedback": 2
8+
"murfey_feedback": 2,
9+
"images": 3
910
},
1011
"parameters": {
1112
"cluster": {
@@ -41,5 +42,9 @@
4142
"queue": "{feedback_queue}",
4243
"service": "Murfey"
4344
},
45+
"3": {
46+
"queue": "images",
47+
"service": "Images"
48+
},
4449
"start": [[1, []]]
4550
}

recipes/clem-lif-to-stack.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"root_folder": "{root_folder}"
66
},
77
"output": {
8-
"murfey_feedback": 2
8+
"murfey_feedback": 2,
9+
"images": 3
910
},
1011
"queue": "cluster.submission",
1112
"service": "LIF2STACK"
@@ -17,5 +18,9 @@
1718
"queue": "{feedback_queue}",
1819
"service": "Murfey"
1920
},
21+
"3": {
22+
"queue": "images",
23+
"service": "Images"
24+
},
2025
"start": [[1, []]]
2126
}

recipes/clem-tiff-to-stack-wrapper.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"metadata": "{metadata}"
88
},
99
"output": {
10-
"murfey_feedback": 2
10+
"murfey_feedback": 2,
11+
"images": 3
1112
},
1213
"parameters": {
1314
"cluster": {
@@ -43,5 +44,9 @@
4344
"queue": "{feedback_queue}",
4445
"service": "Murfey"
4546
},
47+
"3": {
48+
"queue": "images",
49+
"service": "Images"
50+
},
4651
"start": [[1, []]]
4752
}

0 commit comments

Comments
 (0)