godpu
Go library and cli to communicate with DPUs and IPUs.
I Want To Contribute
This project welcomes contributions and suggestions. We are happy to have the Community involved via submission of Issues and Pull Requests (with substantive content or even just fixes). We are hoping for the documents, test framework, etc. to become a community process with active engagement. PRs can be reviewed by any number of people, and a maintainer may accept.
See CONTRIBUTING and GitHub Basic Process for more details.
Installation
There are several ways of running this CLI.
Docker
docker pull opiproject/godpu:<version>
You can specify a version like 0.1.1
or use latest
to get the most up-to-date version.
Run latest version of the CLI in a container:
docker run --rm opiproject/godpu:latest --help
Replace --help
with any godpu
command, without godpu
itself.
Golang
go install -v github.com/opiproject/godpu@latest
or import
import (
"github.com/opiproject/godpu"
)
Tests
Test your APIs even if unmerged using your private fork like this:
chmod a+w go.*
docker run --rm -it -v `pwd`:/app -w /app golang:alpine go mod edit -replace github.com/opiproject/opi-api@main=github.com/YOURUSERNAME/opi-api@main
docker run --rm -it -v `pwd`:/app -w /app golang:alpine go get -u github.com/YOURUSERNAME/opi-api/storage/v1alpha1/gen/go@a98ca449468a
docker run --rm -it -v `pwd`:/app -w /app golang:alpine go mod tidy
Generate mocks like this:
go install github.com/vektra/mockery/v2@latest
make mock-generate