Skip to content

Commit ce3c79c

Browse files
committed
removed spack
Signed-off-by: munishchouhan <[email protected]>
1 parent 592e5ad commit ce3c79c

File tree

6 files changed

+2
-289
lines changed

6 files changed

+2
-289
lines changed

README.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@ that it can be used in your Docker (replace-with-your-own-fav-container-engine)
1111

1212
* Build container images on-demand for a given container file (aka Dockerfile);
1313
* Build container images on-demand based on one or more [Conda](https://conda.io/) packages;
14-
* Build container images on-demand based on one or more [Spack](https://spack.io/) packages;
1514
* Build container images for a specified target platform (currently linux/amd64 and linux/arm64);
1615
* Push and cache built containers to a user-provided container repository;
17-
* Build Singularity native containers both using a Singularity spec file, Conda package(s) and Spack package(s);
1816
* Push Singularity native container images to OCI-compliant registries;
1917

2018
### Installation
@@ -148,13 +146,6 @@ container=$(wave --conda-package fastp --platform linux/arm64)
148146
docker run --platform linux/arm64 $container sh -c 'fastp --version'
149147
```
150148
151-
#### Build a Spack package container
152-
153-
```bash
154-
container=$(wave --spack-package cowsay)
155-
docker run $container sh -c 'cowsay Hello world!'
156-
```
157-
158149
#### Build a Singularity container using a Conda package and pushing to a OCI registry
159150
160151
```bash

app/conf/reflect-config.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@
257257
},
258258
{
259259
"name":"io.seqera.wave.api.PackagesSpec$Type",
260-
"fields":[{"name":"CONDA"}, {"name":"SPACK"}]
260+
"fields":[{"name":"CONDA"}]
261261
},
262262
{
263263
"name":"io.seqera.wave.api.ServiceInfo",
@@ -337,11 +337,6 @@
337337
"allDeclaredFields":true,
338338
"methods":[{"name":"<init>","parameterTypes":[] }]
339339
},
340-
{
341-
"name":"io.seqera.wave.config.SpackOpts",
342-
"allDeclaredFields":true,
343-
"methods":[{"name":"<init>","parameterTypes":[] }]
344-
},
345340
{
346341
"name":"io.seqera.wave.core.spec.ConfigSpec",
347342
"allDeclaredFields":true,

app/conf/resource-config.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@
3838
"pattern":"\\Qtemplates/conda/singularityfile-conda-file.txt\\E"
3939
}, {
4040
"pattern":"\\Qtemplates/conda/singularityfile-conda-packages.txt\\E"
41-
}, {
42-
"pattern":"\\Qtemplates/spack/dockerfile-spack-file.txt\\E"
43-
}, {
44-
"pattern":"\\Qtemplates/spack/singularityfile-spack-file.txt\\E"
4541
}, {
4642
"pattern":"java.base:\\Qjdk/internal/icu/impl/data/icudt72b/nfc.nrm\\E"
4743
}, {

app/src/main/java/io/seqera/wave/cli/App.java

Lines changed: 1 addition & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
import io.seqera.wave.cli.util.GptHelper;
5454
import io.seqera.wave.cli.util.YamlHelper;
5555
import io.seqera.wave.config.CondaOpts;
56-
import io.seqera.wave.config.SpackOpts;
5756
import io.seqera.wave.util.DockerIgnoreFilter;
5857
import io.seqera.wave.util.Packer;
5958
import org.slf4j.LoggerFactory;
@@ -154,15 +153,6 @@ public class App implements Runnable {
154153
@Option(names = {"--conda-channels"}, paramLabel = "''", description = "Conda channels used to build the container (default: ${DEFAULT-VALUE}).")
155154
private String condaChannels = DEFAULT_CONDA_CHANNELS;
156155

157-
@Option(names = {"--spack-file"}, paramLabel = "''", description = "A Spack file used to build the container e.g. /some/path/spack.yaml.")
158-
private String spackFile;
159-
160-
@Option(names = {"--spack-package"}, paramLabel = "''", description = "One or more Spack packages used to build the container e.g. cowsay.")
161-
private List<String> spackPackages;
162-
163-
@Option(names = {"--spack-run-command"}, paramLabel = "''", description = "Dockerfile RUN commands used to build the container.")
164-
private List<String> spackRunCommands;
165-
166156
@Option(names = {"--log-level"}, paramLabel = "''", description = "Set the application log level. One of: OFF, ERROR, WARN, INFO, DEBUG, TRACE and ALL")
167157
private String logLevel;
168158

@@ -304,7 +294,7 @@ protected void validateArgs() {
304294
if( !isEmpty(image) && !isEmpty(containerFile) )
305295
throw new IllegalCliArgumentException("Argument --image and --containerfile conflict each other - Specify an image name or a container file for the container to be provisioned");
306296

307-
if( isEmpty(image) && isEmpty(containerFile) && isEmpty(condaFile) && condaPackages==null && isEmpty(spackFile) && spackPackages==null && isEmpty(prompt) )
297+
if( isEmpty(image) && isEmpty(containerFile) && isEmpty(condaFile) && condaPackages==null && isEmpty(prompt) )
308298
throw new IllegalCliArgumentException("Provide either a image name or a container file for the Wave container to be provisioned");
309299

310300
if( isEmpty(towerToken) && !isEmpty(buildRepository) )
@@ -326,45 +316,14 @@ protected void validateArgs() {
326316
if( condaPackages!=null && !isEmpty(containerFile) )
327317
throw new IllegalCliArgumentException("Option --conda-package and --containerfile conflict each other");
328318

329-
// -- check spack options
330-
if( !isEmpty(spackFile) && spackPackages!=null )
331-
throw new IllegalCliArgumentException("Option --spack-file and --spack-package conflict each other");
332-
333-
if( !isEmpty(spackFile) && !isEmpty(image) )
334-
throw new IllegalCliArgumentException("Option --spack-file and --image conflict each other");
335-
336-
if( !isEmpty(spackFile) && !isEmpty(containerFile) )
337-
throw new IllegalCliArgumentException("Option --spack-file and --containerfile conflict each other");
338-
339-
if( spackPackages!=null && !isEmpty(image) )
340-
throw new IllegalCliArgumentException("Option --spack-package and --image conflict each other");
341-
342-
if( spackPackages!=null && !isEmpty(containerFile) )
343-
throw new IllegalCliArgumentException("Option --spack-package and --containerfile conflict each other");
344-
345319
if( !isEmpty(outputFormat) && !List.of("json","yaml").contains(outputFormat) ) {
346320
final String msg = String.format("Invalid output format: '%s' - expected value: json, yaml", outputFormat);
347321
throw new IllegalCliArgumentException(msg);
348322
}
349323

350-
if( condaPackages!=null && spackPackages!=null )
351-
throw new IllegalCliArgumentException("Option --conda-package and --spack-package conflict each other");
352-
353-
if( condaPackages!=null && !isEmpty(spackFile) )
354-
throw new IllegalCliArgumentException("Option --conda-package and --spack-file conflict each other");
355-
356-
if( !isEmpty(condaFile) && spackPackages!=null )
357-
throw new IllegalCliArgumentException("Option --conda-file and --spack-package conflict each other");
358-
359-
if( !isEmpty(condaFile) && !isEmpty(spackFile) )
360-
throw new IllegalCliArgumentException("Option --conda-file and --spack-file conflict each other");
361-
362324
if( !isEmpty(condaFile) && !Files.exists(Path.of(condaFile)) )
363325
throw new IllegalCliArgumentException("The specified Conda file path cannot be accessed - offending file path: " + condaFile);
364326

365-
if( !isEmpty(spackFile) && !Files.exists(Path.of(spackFile)) )
366-
throw new IllegalCliArgumentException("The specified Spack file path cannot be accessed - offending file path: " + spackFile);
367-
368327
if( !isEmpty(contextDir) && isEmpty(containerFile) )
369328
throw new IllegalCliArgumentException("Option --context requires the use of a container file");
370329

@@ -588,11 +547,6 @@ private CondaOpts condaOpts() {
588547
;
589548
}
590549

591-
private SpackOpts spackOpts() {
592-
return new SpackOpts()
593-
.withCommands(spackRunCommands);
594-
}
595-
596550
protected String containerFileBase64() {
597551
return !isEmpty(containerFile)
598552
? encodePathBase64(containerFile)
@@ -618,20 +572,6 @@ protected PackagesSpec packagesSpec() {
618572
;
619573
}
620574

621-
if( !isEmpty(spackFile) ) {
622-
return new PackagesSpec()
623-
.withType(PackagesSpec.Type.SPACK)
624-
.withSpackOpts(spackOpts())
625-
.withEnvironment(encodePathBase64(spackFile));
626-
}
627-
628-
if( !isEmpty(spackPackages) ) {
629-
return new PackagesSpec()
630-
.withType(PackagesSpec.Type.SPACK)
631-
.withSpackOpts(spackOpts())
632-
.withEntries(spackPackages);
633-
}
634-
635575
if( !isEmpty(prompt) ) {
636576
return GptHelper.grabPackages(prompt.stream().collect(Collectors.joining(" ")));
637577
}

app/src/main/resources/io/seqera/wave/cli/usage-examples.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ Examples:
1515
# Build a container based on Conda lock file served via prefix.dev service
1616
wave --conda-package https://prefix.dev/envs/pditommaso/wave/conda-lock.yml
1717

18-
# Build a container based on Spack packages
19-
wave --spack-package cowsay
20-
2118
# Build a container getting a persistent image name
2219
wave -i alpine --freeze --build-repo docker.io/user/repo --tower-token <YOUR TOKEN>
2320

app/src/test/groovy/io/seqera/wave/cli/AppSpackOptsTest.groovy

Lines changed: 0 additions & 206 deletions
This file was deleted.

0 commit comments

Comments
 (0)