Chef is an autamus container recipe writer. Using package from autamus.io, we can generate a Dockerfile with any set of packages!
To run chef, you can either run the go file directly:
$ go run chef.go
USAGE: chef CMD [OPTIONS]
DESCRIPTION: Generate scientific software container recipes
COMMANDS:
NAME ALIAS DESCRIPTION
generate g Generate a Dockerfile from a chef config file.
help ? Get help with a specific subcommand
version Print the version of this command
You can also build the binary first, and then run it.
$ go build
$ ./chef
Currently, the main command generate
requires a chef config file that lists
packages that you want to install from autamus.io. For example:
# chef.yaml
packages:
- clingo:latest
- python:latest
We would then generate the Dockerfile as follows:
$ chef generate
or
$ go run chef.go generate
FROM ghcr.io/autamus/clingo:latest as clingo
FROM ghcr.io/autamus/python:latest as python
FROM spack/ubuntu-bionic
COPY --from=clingo /opt/software /opt/spack/opt/spack
COPY --from=python /opt/software /opt/spack/opt/spack
ENV PATH=/opt/spack/bin:$PATH
WORKDIR /opt/spack
RUN rm -rf opt/spack/.spack-db/
ENTRYPOINT ["/bin/bash"]
You could easily pipe this into a Dockerfile:
$ go run chef.go generate chef.yaml > Dockerfile
To skip validation that the images/tags exist (you'd find out when you build the Dockerfile) do:
$ go run chef.go generate --skip-validation
If you don't provide a chef.yaml file, it defaults to chef.yaml. However you can provide a custom filename:
$ go run chef.go generate custom.yaml