-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added ml-metadata-store
rockfile
#115
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,58 @@ | ||||||
# Based on: https://github.com/open-telemetry/opentelemetry-collector-releases/blob/main/distributions/otelcol/Dockerfile | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should be:
Suggested change
|
||||||
name: ml-metadata-server | ||||||
summary: Part of the ML Metadata (MLMD) framework. | ||||||
description: | | ||||||
ML Metadata is a framework for managing and tracking metadata associated with ML workflows. | ||||||
It is part of the TensorFlow Extended (TFX) ecosystem, but it can be used independently as well. | ||||||
version: "1.14.0" | ||||||
license: Apache-2.0 | ||||||
base: ubuntu@22.04 | ||||||
run-user: _daemon_ | ||||||
|
||||||
platforms: | ||||||
amd64: | ||||||
|
||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. missing the service details |
||||||
parts: | ||||||
server: | ||||||
plugin: nil | ||||||
source: https://github.com/google/ml-metadata.git | ||||||
source-tag: v1.14.0 | ||||||
build-packages: | ||||||
- build-essential | ||||||
- git | ||||||
- clang | ||||||
- cmake | ||||||
- make | ||||||
- ca-certificates | ||||||
- musl-dev | ||||||
- openssl | ||||||
- curl | ||||||
- unzip | ||||||
- software-properties-common | ||||||
- python3-distutils | ||||||
- python-is-python3 | ||||||
- python3-dev | ||||||
build-environment: | ||||||
- CGO_ENABLED: 0 | ||||||
- GOOS: linux | ||||||
- BAZEL_VERSION: 5.3.0 | ||||||
override-build: | | ||||||
# Set up Bazel 5.3.0 | ||||||
mkdir /bazel && cd /bazel | ||||||
curl -H "User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36" -fSsL -O https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh && \ | ||||||
curl -H "User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36" -fSsL -o /bazel/LICENSE.txt https://raw.githubusercontent.com/bazelbuild/bazel/master/LICENSE && \ | ||||||
chmod +x bazel-*.sh && ./bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh && \ | ||||||
cd $CRAFT_PART_BUILD && rm -f /bazel/bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh | ||||||
|
||||||
#Build | ||||||
bazel build -c opt --action_env=PATH \ | ||||||
--define=grpc_no_ares=true --verbose_failures \ | ||||||
//ml_metadata/metadata_store:metadata_store_server --cxxopt="-std=c++17" | ||||||
|
||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. missing the step to copy libmysqlclient source onto third_party folder |
||||||
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 --root=${CRAFT_PROJECT_DIR}/../bundles/ubuntu-22.04/rootfs/ -f '${db:Status-Abbrev},${binary:Package},${Version},${source:Package},${Source:Version}\n' -W) \ | ||||||
> ${CRAFT_PART_INSTALL}/usr/share/rocks/dpkg.query |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you add the sanity tests to check for the:
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Copyright 2024 Canonical Ltd. | ||
# See LICENSE file for licensing details. | ||
[tox] | ||
skipsdist = True | ||
skip_missing_interpreters = True | ||
envlist = pack, export-to-docker, sanity, integration | ||
|
||
[testenv] | ||
setenv = | ||
PYTHONPATH={toxinidir} | ||
PYTHONBREAKPOINT=ipdb.set_trace | ||
|
||
[testenv:pack] | ||
passenv = * | ||
allowlist_externals = | ||
rockcraft | ||
commands = | ||
rockcraft pack | ||
|
||
[testenv:export-to-docker] | ||
passenv = * | ||
allowlist_externals = | ||
bash | ||
skopeo | ||
yq | ||
commands = | ||
# export rock to docker | ||
bash -c 'NAME=$(yq eval .name rockcraft.yaml) && \ | ||
VERSION=$(yq eval .version rockcraft.yaml) && \ | ||
ARCH=$(yq eval ".platforms | keys | .[0]" rockcraft.yaml) && \ | ||
ROCK="$\{NAME\}_$\{VERSION\}_$\{ARCH\}.rock" && \ | ||
DOCKER_IMAGE=$NAME:$VERSION && \ | ||
echo "Exporting $ROCK to docker as $DOCKER_IMAGE" && \ | ||
skopeo --insecure-policy copy oci-archive:$ROCK docker-daemon:$DOCKER_IMAGE' | ||
|
||
[testenv:sanity] | ||
passenv = * | ||
deps = | ||
pytest | ||
charmed-kubeflow-chisme | ||
commands = | ||
# run rock tests | ||
pytest -s -v --tb native --show-capture=all --log-cli-level=INFO {posargs} {toxinidir}/tests | ||
|
||
[testenv:integration] | ||
passenv = * | ||
allowlist_externals = | ||
echo | ||
commands = | ||
# TODO: Implement integration tests here | ||
echo "WARNING: This is a placeholder test - no test is implemented here." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to install
tzdata
package in the final rock, see in the Dockerfile