-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add rockcraft.yaml for tensorboard-controller
- Loading branch information
1 parent
7af1462
commit 71cb352
Showing
1 changed file
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: tensorboard-controller | ||
summary: An image for Tensorboard controller | ||
description: | | ||
This image is used as part of the Charmed Kubeflow product. The controller allows users to | ||
create a custom resource "TensorBoard" | ||
version: v1.7.0_22.04_1 # version format: <KF-upstream-version>_<base-version>_<Charmed-KF-version> | ||
license: Apache-2.0 | ||
base: ubuntu:22.04 | ||
services: | ||
tensorboard: | ||
override: replace | ||
summary: "tensorboard-controller service" | ||
startup: enabled | ||
user: ubuntu | ||
command: "/manager" | ||
platforms: | ||
amd64: | ||
|
||
parts: | ||
tensorboard-controller: | ||
plugin: go | ||
source: https://github.com/kubeflow/kubeflow | ||
source-type: git | ||
source-tag: v1.7-branch # upstream branch | ||
build-snaps: | ||
- go | ||
build-environment: | ||
- CGO_ENABLED: 0 | ||
- GOOS: linux | ||
override-build: | | ||
set -xe | ||
cd $CRAFT_PART_SRC/components/tensorboard-controller/ | ||
# build | ||
go mod tidy | ||
go mod download all | ||
go build -a -o manager main.go | ||
# install build artifacts | ||
mkdir -p $CRAFT_PART_INSTALL/ | ||
cp manager $CRAFT_PART_INSTALL/ | ||
security-team-requirement: | ||
plugin: nil | ||
override-build: | | ||
mkdir -p ${CRAFT_PART_INSTALL}/usr/share/rocks | ||
(echo "# os-release" && cat /etc/os-release && echo "# dpkg-query" && \ | ||
dpkg-query -f '${db:Status-Abbrev},${binary:Package},${Version},${source:Package},${Source:Version}\n' -W) \ | ||
> ${CRAFT_PART_INSTALL}/usr/share/rocks/dpkg.query | ||
non-root-user: | ||
plugin: nil | ||
after: [tensorboard-controller] | ||
overlay-script: | | ||
# Create a user in the $CRAFT_OVERLAY chroot | ||
groupadd -R $CRAFT_OVERLAY -g 1001 ubuntu | ||
useradd -R $CRAFT_OVERLAY -M -r -u 1001 -g ubuntu ubuntu |