model-backend

module
v0.15.0-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2023 License: Apache-2.0

README

model-backend

Integration Test

model-backend manages all model resources including model definitions and model instances within Versatile Data Pipeline (VDP) to convert the unstructured data to meaningful data representations.

Local dev

On the local machine, clone vdp repository in your workspace, move to the repository folder, and launch all dependent microservices:

$ cd <your-workspace>
$ git clone https://github.com/instill-ai/vdp.git
$ cd vdp
$ make latest PROFILE=model

Clone model-backend repository in your workspace and move to the repository folder:

$ cd <your-workspace>
$ git clone https://github.com/instill-ai/model-backend.git
$ cd model-backend
Build the dev image
$ make build
Run the dev container
$ make dev

Now, you have the Go project set up in the container, in which you can compile and run the binaries together with the integration test in each container shell.

Run the server
$ docker exec -it model-backend /bin/bash
$ go run ./cmd/migration
$ go run ./cmd/init
$ go run ./cmd/main
Run the Temporal worker
$ docker exec -it model-backend /bin/bash
$ go run ./cmd/worker
Run the integration test
$ docker exec -it model-backend /bin/bash
$ make integration-test
Stop the dev container
$ make stop
CI/CD
  • pull_request to the main branch will trigger the Integration Test workflow running the integration test using the image built on the PR head branch.
  • push to the main branch will trigger
    • the Integration Test workflow building and pushing the :latest image on the main branch, following by running the integration test, and
    • the Release Please workflow, which will create and update a PR with respect to the up-to-date main branch using release-please-action.

Once the release PR is merged to the main branch, the release-please-action will tag and release a version correspondingly.

The images are pushed to Docker Hub repository.

License

See the LICENSE file for licensing information.

Directories

Path Synopsis
cmd
internal
pkg
datamodel
Package datamodel contains the data models for the API.
Package datamodel contains the data models for the API.
db

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL