This guide is intended for users installing Modelbox and developers who wish to contribute to the project to build modelbox from source.
go build -o build/modelbox ./cmd/modelbox
goreleaser build --single-target --snapshot
This is the preferred way to build ModelBox as it creates binaries for all the versions we support -
Install goreleaser first - https://goreleaser.com/install/
Once gorealeaser is installed, run the following command -
goreleaser build --snapshot --rm-dist
This will build the modelbox server binary from source and create a Docker container to run the server. This is only possible if goreleaser is invoked in the realease mode.
goreleaser release --snapshot --rm-dist
This creates the following docker images -
(base) diptanuc@firefly:~/Projects/modelbox$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
diptanu/modelbox 0.0.1-next-amd64 893ae15a50b7 2 minutes ago 14.9MB
diptanu/modelbox 0.0.1-next-arm64v8 67ff73eb4604 2 minutes ago 14.4MB
The Docker image has a copy of the configuration which is generated by modelbox server init-config
so it stores metadata in ephemeral storage and uses in-memory storage for metrics. For real usage in production, the config should be modified and bind-mounted into the container at /app/modelbox.toml