Skip to content

Commit fc59d9f

Browse files
vsochmuffato
andauthored
adding support for alias files (#557)
* adding support for alias files an alias file is a yaml file "lookup" alongside a container.yaml that can be used to provide tag specific commands for a particular container tag * updating alias-files -> overrides Signed-off-by: vsoch <[email protected]> Co-authored-by: Matthieu Muffato <[email protected]>
1 parent b1de8ee commit fc59d9f

File tree

28 files changed

+2911
-12
lines changed

28 files changed

+2911
-12
lines changed

.github/workflows/test-container.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,15 @@ jobs:
3333
run: |
3434
# Continue if we have a changed recipe file
3535
if [[ "${{ matrix.changed_recipe }}" = registry* ]]; then
36-
echo "keepgoing=true" >> $GITHUB_ENV
36+
recipe_basename=$(basename "${{ matrix.changed_recipe }}")
37+
if [[ "${recipe_basename}" == "container.yaml" ]]; then
38+
echo "keepgoing=true" >> $GITHUB_ENV
39+
fi
3740
fi
3841
3942
- name: Checkout
4043
if: ${{ env.keepgoing == 'true' }}
41-
uses: actions/checkout@v2
44+
uses: actions/checkout@v3
4245

4346
- name: Make Space For Build
4447
if: ${{ env.keepgoing == 'true' }}

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ and **Merged pull requests**. Critical items to know are:
1414
The versions coincide with releases on pip. Only major versions will be released as tags on Github.
1515

1616
## [0.0.x](https://github.com/singularityhub/singularity-hpc/tree/main) (0.0.x)
17+
- adding support for container.yaml overrides (0.0.56)
1718
- `SINGULARITY_CONTAINER` and `PODMAN_CONTAINER` support (0.0.55)
1819
- support for views create, delete, edit, install, uninstall (0.0.54)
1920
- also including cleanup of module in views on uninstall

docs/getting_started/developer-guide.rst

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,50 @@ For each of the above, depending on the prefix of options that you choose, it wi
198198
This means that if you design a new registry recipe, you should consider how to run it for both kinds of technology. Also note that ``docker_options`` are
199199
those that will also be used for Podman.
200200

201+
Overrides
202+
---------
203+
204+
It might be the case that as your containers change over time, the set of any of:
205+
206+
- commands (aliases)
207+
- docker_script
208+
- singularity_script
209+
- environment (env)
210+
- features
211+
- description
212+
213+
does too! Or it be the case that you have hundreds of aliases, and want to better organize them separately from the container.yaml. To support this, shpc
214+
(as of version 0.0.56) has support for an ``overrides`` section in the container.yaml, meaning that you can define pairs of container
215+
tags and relative path lookups to external files with any of the stated sections. A simple example might look like this:
216+
217+
.. code-block:: yaml
218+
219+
docker: python
220+
url: https://hub.docker.com/_/python
221+
maintainer: '@vsoch'
222+
description: An interpreted, high-level and general-purpose programming language.
223+
latest:
224+
3.9.5-alpine: sha256:f189f7366b0d381bf6186b2a2c3d37f143c587e0da2e8dcc21a732bddf4e6f7b
225+
tags:
226+
3.9.2-alpine: sha256:f046c06388c0721961fe5c9b6184d2f8aeb7eb01b39601babab06cfd975dae01
227+
overrides:
228+
3.9.2-alpine: aliases/3.9.2-alpine.yaml
229+
aliases:
230+
python: /usr/local/bin/python
231+
232+
233+
Since this file only has aliases, we chose to use a subdirectory called "aliases" to make that clear, however
234+
the file can have any of the fields mentioned above, and can be organized in any relative path to the container directory that you deem apppropriate.
235+
Here is what this corresponding file with relative path ``aliases/3.9.2-alpine.yaml`` might look like this:
236+
237+
.. code-block:: yaml
238+
239+
aliases:
240+
python: /alias/path/to/python
241+
242+
Finally, for all fields mentioned above, the format is expected to follow the same convention as above (and it will be validated again on update).
243+
244+
201245
Wrapper Script
202246
--------------
203247

@@ -514,6 +558,9 @@ Fields include:
514558
* - aliases
515559
- Named entrypoints for container (dict) as described above
516560
- false
561+
* - overrides
562+
- Key value pairs to override container.yaml defaults.
563+
- false
517564
* - url
518565
- Documentation or other url for the container uri
519566
- false
Lines changed: 247 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,247 @@
1+
aliases:
2+
Co: Co
3+
LTSInterFoam: LTSInterFoam
4+
LTSReactingParcelFoam: LTSReactingParcelFoam
5+
Lambda2: Lambda2
6+
MRFInterFoam: MRFInterFoam
7+
MRFMultiphaseInterFoam: MRFMultiphaseInterFoam
8+
Mach: Mach
9+
PDRFoam: PDRFoam
10+
PDRMesh: PDRMesh
11+
Pe: Pe
12+
Q: Q
13+
R: R
14+
SRFPimpleFoam: SRFPimpleFoam
15+
SRFSimpleFoam: SRFSimpleFoam
16+
XiFoam: XiFoam
17+
adiabaticFlameT: adiabaticFlameT
18+
adjointShapeOptimizationFoam: adjointShapeOptimizationFoam
19+
ansysToFoam: ansysToFoam
20+
applyBoundaryLayer: applyBoundaryLayer
21+
applyWallFunctionBoundaryConditions: applyWallFunctionBoundaryConditions
22+
attachMesh: attachMesh
23+
autoPatch: autoPatch
24+
autoRefineMesh: autoRefineMesh
25+
blockMesh: blockMesh
26+
boundaryFoam: boundaryFoam
27+
boxTurb: boxTurb
28+
buoyantBoussinesqPimpleFoam: buoyantBoussinesqPimpleFoam
29+
buoyantBoussinesqSimpleFoam: buoyantBoussinesqSimpleFoam
30+
buoyantPimpleFoam: buoyantPimpleFoam
31+
buoyantSimpleFoam: buoyantSimpleFoam
32+
cavitatingDyMFoam: cavitatingDyMFoam
33+
cavitatingFoam: cavitatingFoam
34+
cfx4ToFoam: cfx4ToFoam
35+
changeDictionary: changeDictionary
36+
checkMesh: checkMesh
37+
chemFoam: chemFoam
38+
chemkinToFoam: chemkinToFoam
39+
chtMultiRegionFoam: chtMultiRegionFoam
40+
chtMultiRegionSimpleFoam: chtMultiRegionSimpleFoam
41+
coalChemistryFoam: coalChemistryFoam
42+
coldEngineFoam: coldEngineFoam
43+
collapseEdges: collapseEdges
44+
combinePatchFaces: combinePatchFaces
45+
compressibleInterDyMFoam: compressibleInterDyMFoam
46+
compressibleInterFoam: compressibleInterFoam
47+
compressibleTwoPhaseEulerFoam: compressibleTwoPhaseEulerFoam
48+
createBaffles: createBaffles
49+
createPatch: createPatch
50+
createTurbulenceFields: createTurbulenceFields
51+
datToFoam: datToFoam
52+
decomposePar: decomposePar
53+
deformedGeom: deformedGeom
54+
dnsFoam: dnsFoam
55+
dsmcFieldsCalc: dsmcFieldsCalc
56+
dsmcFoam: dsmcFoam
57+
dsmcInitialise: dsmcInitialise
58+
electrostaticFoam: electrostaticFoam
59+
engineCompRatio: engineCompRatio
60+
engineFoam: engineFoam
61+
engineSwirl: engineSwirl
62+
enstrophy: enstrophy
63+
equilibriumCO: equilibriumCO
64+
equilibriumFlameT: equilibriumFlameT
65+
execFlowFunctionObjects: execFlowFunctionObjects
66+
expandDictionary: expandDictionary
67+
extrude2DMesh: extrude2DMesh
68+
extrudeMesh: extrudeMesh
69+
extrudeToRegionMesh: extrudeToRegionMesh
70+
faceAgglomerate: faceAgglomerate
71+
financialFoam: financialFoam
72+
fireFoam: fireFoam
73+
flattenMesh: flattenMesh
74+
flowType: flowType
75+
fluent3DMeshToFoam: fluent3DMeshToFoam
76+
fluentMeshToFoam: fluentMeshToFoam
77+
foamCalc: foamCalc
78+
foamDataToFluent: foamDataToFluent
79+
foamDebugSwitches: foamDebugSwitches
80+
foamFormatConvert: foamFormatConvert
81+
foamHelp: foamHelp
82+
foamInfoExec: foamInfoExec
83+
foamListTimes: foamListTimes
84+
foamMeshToFluent: foamMeshToFluent
85+
foamToEnsight: foamToEnsight
86+
foamToEnsightParts: foamToEnsightParts
87+
foamToGMV: foamToGMV
88+
foamToStarMesh: foamToStarMesh
89+
foamToSurface: foamToSurface
90+
foamToTetDualMesh: foamToTetDualMesh
91+
foamToVTK: foamToVTK
92+
foamUpgradeCyclics: foamUpgradeCyclics
93+
foamUpgradeFvSolution: foamUpgradeFvSolution
94+
gambitToFoam: gambitToFoam
95+
gmshToFoam: gmshToFoam
96+
icoFoam: icoFoam
97+
icoUncoupledKinematicParcelDyMFoam: icoUncoupledKinematicParcelDyMFoam
98+
icoUncoupledKinematicParcelFoam: icoUncoupledKinematicParcelFoam
99+
ideasUnvToFoam: ideasUnvToFoam
100+
insideCells: insideCells
101+
interDyMFoam: interDyMFoam
102+
interFoam: interFoam
103+
interMixingFoam: interMixingFoam
104+
interPhaseChangeFoam: interPhaseChangeFoam
105+
kivaToFoam: kivaToFoam
106+
laplacianFoam: laplacianFoam
107+
magneticFoam: magneticFoam
108+
mapFields: mapFields
109+
mdEquilibrationFoam: mdEquilibrationFoam
110+
mdFoam: mdFoam
111+
mdInitialise: mdInitialise
112+
mergeMeshes: mergeMeshes
113+
mergeOrSplitBaffles: mergeOrSplitBaffles
114+
mhdFoam: mhdFoam
115+
mirrorMesh: mirrorMesh
116+
mixtureAdiabaticFlameT: mixtureAdiabaticFlameT
117+
modifyMesh: modifyMesh
118+
moveDynamicMesh: moveDynamicMesh
119+
moveEngineMesh: moveEngineMesh
120+
moveMesh: moveMesh
121+
mshToFoam: mshToFoam
122+
multiphaseEulerFoam: multiphaseEulerFoam
123+
multiphaseInterFoam: multiphaseInterFoam
124+
netgenNeutralToFoam: netgenNeutralToFoam
125+
nonNewtonianIcoFoam: nonNewtonianIcoFoam
126+
objToVTK: objToVTK
127+
pPrime2: pPrime2
128+
particleTracks: particleTracks
129+
patchAverage: patchAverage
130+
patchIntegrate: patchIntegrate
131+
patchSummary: patchSummary
132+
pdfPlot: pdfPlot
133+
pimpleDyMFoam: pimpleDyMFoam
134+
pimpleFoam: pimpleFoam
135+
pisoFoam: pisoFoam
136+
plot3dToFoam: plot3dToFoam
137+
polyDualMesh: polyDualMesh
138+
porousInterFoam: porousInterFoam
139+
porousSimpleFoam: porousSimpleFoam
140+
postChannel: postChannel
141+
potentialFoam: potentialFoam
142+
potentialFreeSurfaceFoam: potentialFreeSurfaceFoam
143+
probeLocations: probeLocations
144+
ptot: ptot
145+
reactingFoam: reactingFoam
146+
reactingParcelFilmFoam: reactingParcelFilmFoam
147+
reactingParcelFoam: reactingParcelFoam
148+
reconstructPar: reconstructPar
149+
reconstructParMesh: reconstructParMesh
150+
redistributePar: redistributePar
151+
refineHexMesh: refineHexMesh
152+
refineMesh: refineMesh
153+
refineWallLayer: refineWallLayer
154+
refinementLevel: refinementLevel
155+
removeFaces: removeFaces
156+
renumberMesh: renumberMesh
157+
rhoCentralDyMFoam: rhoCentralDyMFoam
158+
rhoCentralFoam: rhoCentralFoam
159+
rhoLTSPimpleFoam: rhoLTSPimpleFoam
160+
rhoPimpleFoam: rhoPimpleFoam
161+
rhoPimplecFoam: rhoPimplecFoam
162+
rhoPorousSimpleFoam: rhoPorousSimpleFoam
163+
rhoReactingBuoyantFoam: rhoReactingBuoyantFoam
164+
rhoReactingFoam: rhoReactingFoam
165+
rhoSimpleFoam: rhoSimpleFoam
166+
rhoSimplecFoam: rhoSimplecFoam
167+
rotateMesh: rotateMesh
168+
sammToFoam: sammToFoam
169+
sample: sample
170+
scalarTransportFoam: scalarTransportFoam
171+
selectCells: selectCells
172+
setFields: setFields
173+
setSet: setSet
174+
setsToZones: setsToZones
175+
settlingFoam: settlingFoam
176+
shallowWaterFoam: shallowWaterFoam
177+
simpleFoam: simpleFoam
178+
simpleReactingParcelFoam: simpleReactingParcelFoam
179+
singleCellMesh: singleCellMesh
180+
smapToFoam: smapToFoam
181+
snappyHexMesh: snappyHexMesh
182+
solidDisplacementFoam: solidDisplacementFoam
183+
solidEquilibriumDisplacementFoam: solidEquilibriumDisplacementFoam
184+
sonicDyMFoam: sonicDyMFoam
185+
sonicFoam: sonicFoam
186+
sonicLiquidFoam: sonicLiquidFoam
187+
splitCells: splitCells
188+
splitMesh: splitMesh
189+
splitMeshRegions: splitMeshRegions
190+
sprayEngineFoam: sprayEngineFoam
191+
sprayFoam: sprayFoam
192+
star3ToFoam: star3ToFoam
193+
star4ToFoam: star4ToFoam
194+
steadyParticleTracks: steadyParticleTracks
195+
stitchMesh: stitchMesh
196+
streamFunction: streamFunction
197+
stressComponents: stressComponents
198+
subsetMesh: subsetMesh
199+
surfaceAdd: surfaceAdd
200+
surfaceAutoPatch: surfaceAutoPatch
201+
surfaceBooleanFeatures: surfaceBooleanFeatures
202+
surfaceCheck: surfaceCheck
203+
surfaceClean: surfaceClean
204+
surfaceCoarsen: surfaceCoarsen
205+
surfaceConvert: surfaceConvert
206+
surfaceFeatureConvert: surfaceFeatureConvert
207+
surfaceFeatureExtract: surfaceFeatureExtract
208+
surfaceFind: surfaceFind
209+
surfaceInertia: surfaceInertia
210+
surfaceMeshConvert: surfaceMeshConvert
211+
surfaceMeshConvertTesting: surfaceMeshConvertTesting
212+
surfaceMeshExport: surfaceMeshExport
213+
surfaceMeshImport: surfaceMeshImport
214+
surfaceMeshInfo: surfaceMeshInfo
215+
surfaceMeshTriangulate: surfaceMeshTriangulate
216+
surfaceOrient: surfaceOrient
217+
surfacePointMerge: surfacePointMerge
218+
surfaceRedistributePar: surfaceRedistributePar
219+
surfaceRefineRedGreen: surfaceRefineRedGreen
220+
surfaceSmooth: surfaceSmooth
221+
surfaceSplitByPatch: surfaceSplitByPatch
222+
surfaceSplitByTopology: surfaceSplitByTopology
223+
surfaceSplitNonManifolds: surfaceSplitNonManifolds
224+
surfaceSubset: surfaceSubset
225+
surfaceToPatch: surfaceToPatch
226+
surfaceTransformPoints: surfaceTransformPoints
227+
temporalInterpolate: temporalInterpolate
228+
tetgenToFoam: tetgenToFoam
229+
topoSet: topoSet
230+
transformPoints: transformPoints
231+
twoLiquidMixingFoam: twoLiquidMixingFoam
232+
twoPhaseEulerFoam: twoPhaseEulerFoam
233+
uncoupledKinematicParcelFoam: uncoupledKinematicParcelFoam
234+
uprime: uprime
235+
viewFactorsGen: viewFactorsGen
236+
vorticity: vorticity
237+
vtkUnstructuredToFoam: vtkUnstructuredToFoam
238+
wallFunctionTable: wallFunctionTable
239+
wallGradU: wallGradU
240+
wallHeatFlux: wallHeatFlux
241+
wallShearStress: wallShearStress
242+
wdot: wdot
243+
writeCellCentres: writeCellCentres
244+
writeMeshObj: writeMeshObj
245+
yPlusLES: yPlusLES
246+
yPlusRAS: yPlusRAS
247+
zipUpMesh: zipUpMesh

0 commit comments

Comments
 (0)