From 9459b2045a4661b921e7fce25fa9c5f492466786 Mon Sep 17 00:00:00 2001 From: kerthcet Date: Wed, 28 Aug 2024 14:39:49 +0800 Subject: [PATCH] Initial commit Signed-off-by: kerthcet --- .dockerignore | 3 ++ .github/dependabot.yaml | 18 ++++++++++ .github/workflows/kube-workflow-init.yaml | 10 ++++++ .github/workflows/kube-workflow.yaml | 21 ++++++++++++ .gitignore | 28 +++++++++++++++ .golangci.yml | 40 +++++++++++++++++++++ CODE_OF_CONDUCT.md | 42 +++++++++++++++++++++++ CONTRIBUTING.md | 39 +++++++++++++++++++++ OWNERS | 5 +++ README.md | 11 ++++++ 10 files changed, 217 insertions(+) create mode 100644 .dockerignore create mode 100644 .github/dependabot.yaml create mode 100644 .github/workflows/kube-workflow-init.yaml create mode 100644 .github/workflows/kube-workflow.yaml create mode 100644 .gitignore create mode 100644 .golangci.yml create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md create mode 100644 OWNERS diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..a3aab7a --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file +# Ignore build and test binaries. +bin/ diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml new file mode 100644 index 0000000..9695bb2 --- /dev/null +++ b/.github/dependabot.yaml @@ -0,0 +1,18 @@ +version: 2 +updates: + # Maintain dependencies for go + - package-ecosystem: "gomod" + directory: "/" + schedule: + interval: "weekly" + # labels: + # - "cleanup" + groups: + kubernetes: + patterns: + - "k8s.io/*" + ignore: + # Ignore major and minor versions for dependencies updates + # Allow patches and security updates. + - dependency-name: k8s.io/* + update-types: ["version-update:semver-major", "version-update:semver-minor"] diff --git a/.github/workflows/kube-workflow-init.yaml b/.github/workflows/kube-workflow-init.yaml new file mode 100644 index 0000000..2949d61 --- /dev/null +++ b/.github/workflows/kube-workflow-init.yaml @@ -0,0 +1,10 @@ +name: Initialization Workflow + +on: + workflow_dispatch: + +jobs: + init: + uses: kerthcet/github-workflow-as-kube/.github/workflows/workflow-as-kubernetes-init.yaml@v0.1.3 + secrets: + AGENT_TOKEN: ${{ secrets.AGENT_TOKEN }} diff --git a/.github/workflows/kube-workflow.yaml b/.github/workflows/kube-workflow.yaml new file mode 100644 index 0000000..e68ebef --- /dev/null +++ b/.github/workflows/kube-workflow.yaml @@ -0,0 +1,21 @@ +name: Event Workflow + +on: + issues: + types: + - opened + issue_comment: + types: + - created + pull_request_target: + types: + - opened + - synchronize + - labeled + - unlabeled + +jobs: + event-handler: + uses: kerthcet/github-workflow-as-kube/.github/workflows/workflow-as-kubernetes.yaml@v0.1.3 + secrets: + AGENT_TOKEN: ${{ secrets.AGENT_TOKEN }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..54a93e3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,28 @@ + +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib +bin/* +Dockerfile.cross + +# Test binary, build with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Kubernetes Generated files - skip generated files, except for vendored files + +!vendor/**/zz_generated.* + +# editor and IDE paraphernalia +.idea +.vscode +*.swp +*.swo +*~ + +.DS_Store \ No newline at end of file diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..aed8644 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,40 @@ +run: + deadline: 5m + allow-parallel-runners: true + +issues: + # don't skip warning about doc comments + # don't exclude the default set of lint + exclude-use-default: false + # restore some of the defaults + # (fill in the rest as needed) + exclude-rules: + - path: "api/*" + linters: + - lll + - path: "internal/*" + linters: + - dupl + - lll +linters: + disable-all: true + enable: + - dupl + - errcheck + - exportloopref + - goconst + - gocyclo + - gofmt + - goimports + - gosimple + - govet + - ineffassign + - lll + - misspell + - nakedret + - prealloc + - staticcheck + - typecheck + - unconvert + - unparam + - unused diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..aec3ba7 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,42 @@ +# Code of Conduct + +👋 Welcome to InftyAI community ! + +- [Scope](#scope) +- [Our Standards](#our-standards) + +## Scope + +This code of conduct applies within project and community spaces. + +## Our Standards + +Examples of behavior that contributes to a positive environment include but are not limited to: + +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +- Focusing on what is best not just for us as individuals, but for the + overall community +- Using welcoming and inclusive language + +Examples of unacceptable behavior include but are not limited to: + +- The use of sexualized language or imagery +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment in any form +- Publishing others' private information, such as a physical or email + address, without their explicit permission +- Violence, threatening violence, or encouraging others to engage in violent behavior +- Stalking or following someone without their consent +- Unwelcome physical contact +- Unwelcome sexual or romantic attention or advances +- Other conduct which could reasonably be considered inappropriate in a + professional setting + +The following behaviors are also prohibited: + +- Providing knowingly false or misleading information in connection with a Code of Conduct investigation or otherwise intentionally tampering with an investigation. +- Retaliating against a person because they reported an incident or provided information about an incident as a witness. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..f6b4f5a --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,39 @@ +# Contributing + +👋 Welcome to InftyAI community ! + +- [Before you get started](#before-you-get-started) + - [Code of Conduct](#code-of-conduct) +- [Getting started](#getting-started) + - [PullRequests](#pull-requests) + - [Code Review](#code-review) + +## Before you get started + +### Code of Conduct + +Please make sure to read and observe our [Code of Conduct](/CODE_OF_CONDUCT.md) first. + +## Getting started + +🚀 **All kinds of contributions are welcomed !** + +- Fix documents & Typos +- Report & fix bugs +- New features +- Issues & discussions +- ... + +### Pull Requests + +Pull requests are often called simply "PR". +Please follows the standard [github pull request](https://help.github.com/articles/about-pull-requests/) process. +To submit a proposed change, please develop the code and add new test cases. + +### Code Review + +To make it easier for your PR to receive reviews, consider the reviewers will need you to: + +- Follow [good coding guidelines](https://github.com/golang/go/wiki/CodeReviewComments). +- Write [good commit messages](https://chris.beams.io/posts/git-commit/). +- Break large changes into a logical series of smaller patches which individually make easily understandable changes, and in aggregate solve a broader issue. diff --git a/OWNERS b/OWNERS new file mode 100644 index 0000000..515ec16 --- /dev/null +++ b/OWNERS @@ -0,0 +1,5 @@ +approvers: + - kerthcet + +reviewers: + - kerthcet diff --git a/README.md b/README.md index d52b553..e462cb4 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,13 @@ # vScheduler + A Kubernetes scheduler designed for smart scheduling with llmaz. + +## Plugins + +vScheduler maintains multiple plugins for llm workloads scheduling. + +### ResourceFungibility + +A llama2-70B model can be run on 2xA100-80GB GPUs, can also be run on 4xA100-40GB GPUs, this is what we called fungibility. + +With resourceFungibility plugin, we can simply achieve with at most 8 alternatives.