Skip to content

Commit a3d934d

Browse files
committed
update templates for new dockerfile
1 parent 65a1dd8 commit a3d934d

File tree

3 files changed

+15
-32
lines changed

3 files changed

+15
-32
lines changed

helm-based-workflows/templates/msmapper-notebook.yaml

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -41,39 +41,25 @@ spec:
4141
templates:
4242
- name: mount-files
4343
script:
44-
image: ghcr.io/diamondlightsource/magnetic-materials-workflows:0.1.0-rc3
44+
image: ghcr.io/diamondlightsource/magnetic-materials-workflows:0.2.0-rc1
4545
command: [bash]
4646
source: |
4747
echo '{{ .Files.Get "notebooks/msmapper_notebook.ipynb" | b64enc }}' | base64 -d > /tmp/notebook.ipynb
48-
echo '{{ .Files.Get "notebooks/requirements.txt" | b64enc }}' | base64 -d > /tmp/requirements.txt
49-
volumeMounts:
50-
- name: tmp
51-
mountPath: /tmp
52-
- name: download-msmapper
53-
script:
54-
image: docker.io/curlimages/curl
55-
command: [bash]
56-
source: |
57-
mkdir /tmp/msmapper
58-
curl https://alfred.diamond.ac.uk/MSMapper/master/builds-snapshot/MSMapper-1.9.0.v20250205-1441-linux.x86_64.zip -o /tmp/msmapper/archive.zip
59-
unzip -n /tmp/msmapper/archive.zip -d /tmp/msmapper
6048
volumeMounts:
6149
- name: tmp
6250
mountPath: /tmp
6351
- name: convert-notebook
6452
script:
65-
image: ghcr.io/diamondlightsource/magnetic-materials-workflows:0.1.0-rc3
53+
image: ghcr.io/diamondlightsource/magnetic-materials-workflows:0.2.0-rc1
6654
command: [bash]
6755
source: |
68-
python -m venv /tmp/venv
69-
/tmp/venv/bin/pip install -r /tmp/requirements.txt
70-
/tmp/venv/bin/pip install --upgrade git+https://github.com/DiamondLightSource/i16_msmapper.git
71-
/tmp/venv/bin/python -m ipykernel install --prefix=/tmp/venv --name=venv
72-
/tmp/venv/bin/python -m papermill /tmp/notebook.ipynb /tmp/notebook.ipynb \
56+
python -m pip install --upgrade git+https://github.com/DiamondLightSource/i16_msmapper.git
57+
python -m ipykernel install --prefix=/tmp/venv --name=venv
58+
python -m papermill /tmp/notebook.ipynb /tmp/notebook.ipynb \
7359
-p datadir "{{`{{ workflow.parameters.visitdir }}`}}"
7460
-p inpath "{{`{{ workflow.parameters.inpath }}`}}" \
7561
-p outpath "{{`{{ workflow.parameters.outpath }}`}}"
76-
/tmp/venv/bin/jupyter nbconvert --execute --allow-errors --to html --output notebook --output-dir /tmp /tmp/notebook.ipynb
62+
jupyter nbconvert --execute --allow-errors --to html --output notebook --output-dir /tmp /tmp/notebook.ipynb
7763
volumeMounts:
7864
- name: tmp
7965
mountPath: /tmp
@@ -90,8 +76,6 @@ spec:
9076
tasks:
9177
- name: mount-files
9278
template: mount-files
93-
- name: download-msmapper
94-
template: download-msmapper
9579
- name: convert-notebook
9680
template: convert-notebook
97-
dependencies: [mount-files, download-msmapper]
81+
dependencies: [mount-files]

helm-based-workflows/templates/python_script.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,15 @@ spec:
2626
value: |
2727
print(f"Scan command: {cmd}")
2828
script:
29-
image: ghcr.io/diamondlightsource/magnetic-materials-workflows:0.1.0-rc3
29+
image: ghcr.io/diamondlightsource/magnetic-materials-workflows:0.2.0-rc1
3030
volumeMounts:
3131
- name: session
3232
mountPath: "{{`{{ workflow.parameters.visitdir }}`}}"
3333
command: ["python"]
3434
source: |
3535
import numpy as np
3636
import hdfmap
37+
print(hdfmap.module_info())
3738
3839
filename = '{{`{{workflow.parameters.visitdir}}`}}/i10-1-{{`{{inputs.parameters.scan-no}}`}}.nxs'
3940
print(filename)

helm-based-workflows/templates/xas-notebook.yaml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ spec:
4141
templates:
4242
- name: mount-files
4343
script:
44-
image: ghcr.io/diamondlightsource/magnetic-materials-workflows:0.1.0-rc3
44+
image: ghcr.io/diamondlightsource/magnetic-materials-workflows:0.2.0-rc1
4545
command: [bash]
4646
source: |
4747
echo '{{ .Files.Get "notebooks/xas_notebook.ipynb" | b64enc }}' | base64 -d > /tmp/notebook.ipynb
@@ -51,17 +51,15 @@ spec:
5151
mountPath: /tmp
5252
- name: convert-notebook
5353
script:
54-
image: ghcr.io/diamondlightsource/magnetic-materials-workflows:0.1.0-rc3
54+
image: ghcr.io/diamondlightsource/magnetic-materials-workflows:0.2.0-rc1
5555
command: [bash]
5656
source: |
57-
python -m venv /tmp/venv
58-
/tmp/venv/bin/pip install -r /tmp/requirements.txt
59-
/tmp/venv/bin/pip install --upgrade git+https://github.com/DanPorter/mmg_toolbox.git
60-
/tmp/venv/bin/python -m ipykernel install --prefix=/tmp/venv --name=venv
61-
/tmp/venv/bin/python -m papermill /tmp/notebook.ipynb /tmp/notebook.ipynb \
57+
python -m pip install --upgrade git+https://github.com/DanPorter/mmg_toolbox.git
58+
python -m ipykernel install --prefix=/tmp/venv --name=venv
59+
python -m papermill /tmp/notebook.ipynb /tmp/notebook.ipynb \
6260
-p inpath "{{`{{ workflow.parameters.inpath }}`}}" \
6361
-p outpath "{{`{{ workflow.parameters.outpath }}`}}"
64-
/tmp/venv/bin/jupyter nbconvert --execute --allow-errors --to html --output notebook --output-dir /tmp /tmp/notebook.ipynb
62+
jupyter nbconvert --execute --allow-errors --to html --output notebook --output-dir /tmp /tmp/notebook.ipynb
6563
volumeMounts:
6664
- name: tmp
6765
mountPath: /tmp

0 commit comments

Comments
 (0)