Skip to content
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

Fix CI #838

Merged
merged 52 commits into from
Jan 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
c18680c
update ci and initdevices logic
archlitchi Nov 15, 2024
856bcac
update devices
archlitchi Nov 15, 2024
577f93f
prepare to update v2.4.1
archlitchi Nov 15, 2024
be2ff8a
Merge branch 'Project-HAMi:master' into master
archlitchi Nov 15, 2024
a453160
update vGPUmonitor to add dynamic adjustment on core and memory limit
archlitchi Nov 18, 2024
29e7a74
Merge branch 'Project-HAMi:master' into master
archlitchi Nov 18, 2024
c7df495
Merge branch 'Project-HAMi:master' into master
archlitchi Nov 22, 2024
64e5a73
Merge branch 'Project-HAMi:master' into master
archlitchi Nov 27, 2024
dbdf4da
Merge branch 'Project-HAMi:master' into master
archlitchi Nov 29, 2024
33113b2
update
archlitchi Nov 29, 2024
d895719
Merge branch 'Project-HAMi:master' into master
archlitchi Nov 29, 2024
13486f1
Merge branch 'Project-HAMi:master' into master
archlitchi Dec 12, 2024
a078f1f
Merge branch 'Project-HAMi:master' into master
archlitchi Dec 16, 2024
c794210
Merge branch 'Project-HAMi:master' into master
archlitchi Dec 16, 2024
2ce717d
fix chart can't be deployed properly
archlitchi Dec 16, 2024
f5b2591
fix chart can't be deployed properly
archlitchi Dec 16, 2024
baf2c87
Merge branch 'Project-HAMi:master' into master
archlitchi Dec 16, 2024
0ff2c42
fix nodelock issues
archlitchi Dec 17, 2024
566ceca
update dynamic-mig document and examples
archlitchi Dec 19, 2024
98ecaa9
update dynamic-mig document and examples
archlitchi Dec 19, 2024
a66fad0
update dynamic-mig document and examples
archlitchi Dec 19, 2024
f83861c
Merge branch 'Project-HAMi:master' into master
archlitchi Dec 19, 2024
9f9f8b0
update documents
archlitchi Dec 23, 2024
c6ddcad
Merge branch 'master' of github.com:archlitchi/HAMi
archlitchi Dec 23, 2024
cecd68a
Merge branch 'Project-HAMi:master' into master
archlitchi Dec 23, 2024
ae22e81
update nodelock for mig instance & add document for mig monitor
archlitchi Dec 24, 2024
c3c49d8
Merge branch 'master' of github.com:archlitchi/HAMi
archlitchi Dec 24, 2024
a023937
Merge branch 'Project-HAMi:master' into master
archlitchi Dec 24, 2024
24eea30
Merge branch 'Project-HAMi:master' into master
archlitchi Dec 24, 2024
925b5da
update documents
archlitchi Dec 24, 2024
26b8680
Merge branch 'master' of github.com:archlitchi/HAMi
archlitchi Dec 24, 2024
4efa365
update documents for config
archlitchi Dec 24, 2024
336f83f
Merge branch 'master' of github.com:archlitchi/HAMi
archlitchi Jan 22, 2025
9b0f152
update docs and mig-related logics
archlitchi Jan 24, 2025
44cf07c
update docs
archlitchi Jan 24, 2025
b51d2a7
update docs
archlitchi Jan 24, 2025
fef2951
update libvgpu_so
archlitchi Jan 24, 2025
ea06f21
Merge branch 'Project-HAMi:master' into master
archlitchi Jan 24, 2025
cb2f31e
Merge branch 'Project-HAMi:master' into master
archlitchi Jan 24, 2025
39cff0c
update
archlitchi Jan 24, 2025
22cc9a7
Merge branch 'master' of github.com:archlitchi/HAMi
archlitchi Jan 24, 2025
500b60d
update ci
archlitchi Jan 25, 2025
6be7ab7
update ci
archlitchi Jan 25, 2025
bb935a9
Merge branch 'Project-HAMi:master' into master
archlitchi Jan 25, 2025
db35e26
update ci
archlitchi Jan 25, 2025
93664ac
Merge branch 'master' of github.com:archlitchi/HAMi
archlitchi Jan 25, 2025
2eb17ef
update
archlitchi Jan 25, 2025
e50963f
update
archlitchi Jan 25, 2025
6455e6c
update
archlitchi Jan 25, 2025
6e3291c
update
archlitchi Jan 25, 2025
4158642
update ci
archlitchi Jan 25, 2025
bd80c56
update ci
archlitchi Jan 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 52 additions & 13 deletions .github/workflows/call-release-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Call Release Image
env:
REGISTRY: docker.io
IMAGE_REPO: ${{ secrets.IMAGE_REPO || 'projecthami/hami' }}
IMAGE_REPO_HAMICORE: ${{ secrets.IMAGE_REPO || 'projecthami/hamicore' }}
IMAGE_ROOT_PATH: docker
BUILD_PLATFORM: linux/arm64,linux/amd64
REGISTER_USER: ${{ github.actor }}
Expand Down Expand Up @@ -96,21 +97,59 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_REPO }}
images: ${{ env.REGISTRY }}/${{ env.IMAGE_REPO_HAMICORE }}

#- name: Build & Pushing hami image
# uses: docker/[email protected]
# with:
# context: .
# file: ${{ env.IMAGE_ROOT_PATH }}/Dockerfile
# labels: ${{ steps.meta.outputs.labels }}
# platforms: ${{ env.BUILD_PLATFORM }}
# build-args: |
# VERSION=${{ env.ref }}
# GOLANG_IMAGE=golang:1.22.5-bullseye
# NVIDIA_IMAGE=nvidia/cuda:12.2.0-devel-ubuntu20.04
# DEST_DIR=/usr/local
# tags: ${{ steps.meta.outputs.tags }}
# push: true
# github-token: ${{ env.REGISTER_PASSWORD }}

- name: Build & Pushing hami-core image
uses: docker/[email protected]
with:
context: .
file: ${{ env.IMAGE_ROOT_PATH }}/Dockerfile.hamicore
labels: ${{ steps.meta.outputs.labels }}
platforms: ${{ env.BUILD_PLATFORM }}
build-args: |
VERSION=${{ env.ref }}
GOLANG_IMAGE=golang:1.22.5-bullseye
NVIDIA_IMAGE=nvidia/cuda:12.2.0-devel-ubuntu20.04
DEST_DIR=/usr/local
tags: ${{ steps.meta.outputs.tags }}
push: true
github-token: ${{ env.REGISTER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta1
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_REPO_HAMICORE }}

- name: Build & Pushing hami image
uses: docker/[email protected]
with:
context: .
file: ${{ env.IMAGE_ROOT_PATH }}/Dockerfile
labels: ${{ steps.meta.outputs.labels }}
platforms: ${{ env.BUILD_PLATFORM }}
build-args: |
VERSION=${{ env.ref }}
GOLANG_IMAGE=golang:1.22.5-bullseye
NVIDIA_IMAGE=nvidia/cuda:12.2.0-devel-ubuntu20.04
DEST_DIR=/usr/local
tags: ${{ steps.meta.outputs.tags }}
push: true
github-token: ${{ env.REGISTER_PASSWORD }}
context: .
file: ${{ env.IMAGE_ROOT_PATH }}/Dockerfile.hamimaster
labels: ${{ steps.meta.outputs.labels }}
platforms: ${{ env.BUILD_PLATFORM }}
build-args: |
VERSION=${{ env.ref }}
GOLANG_IMAGE=golang:1.22.5-bullseye
HAMICORE_IMAGE=projecthami/hamicore: ${{ env.ref }}
DEST_DIR=/usr/local
tags: ${{ steps.meta.outputs.tags }}
push: true
github-token: ${{ env.REGISTER_PASSWORD }}

1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ permissions:
env:
REGISTRY: docker.io
IMAGE_REPO: ${{ secrets.IMAGE_REPO || 'projecthami/hami' }}
IMAGE_REPO_HAMICORE: ${{ secrets.IMAGE_REPO || 'projecthami/hamicore' }}
IMAGE_ROOT_PATH: docker
BUILD_PLATFORM: linux/arm64,linux/amd64
REGISTER_USER: ${{ github.actor }}
Expand Down
18 changes: 18 additions & 0 deletions docker/Dockerfile.hamicore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
ARG NVIDIA_IMAGE=nvidia/cuda:12.2.0-devel-ubuntu20.04

FROM $NVIDIA_IMAGE AS nvbuild
COPY ./libvgpu /libvgpu
WORKDIR /libvgpu
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update; apt-get -y install cmake
RUN bash ./build.sh

FROM nvidia/cuda:12.6.3-base-ubuntu22.04
ENV NVIDIA_DISABLE_REQUIRE="true"
ENV NVIDIA_VISIBLE_DEVICES=all
ENV NVIDIA_DRIVER_CAPABILITIES=utility

ARG VERSION
LABEL version="$VERSION"
LABEL maintainer="[email protected]"
COPY --from=nvbuild /libvgpu/build/libvgpu.so /k8s-vgpu/lib/nvidia/libvgpu.so."$VERSION"
32 changes: 32 additions & 0 deletions docker/Dockerfile.hamimaster
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
ARG GOLANG_IMAGE
ARG HAMICORE_IMAGE
FROM $GOLANG_IMAGE AS build
FROM $HAMICORE_IMAGE AS corebuild

FROM $GOLANG_IMAGE AS GOBUILD
ADD . /k8s-vgpu
ARG VERSION
RUN go env -w GO111MODULE=on
RUN cd /k8s-vgpu && make all VERSION=$VERSION
RUN go install github.com/NVIDIA/mig-parted/cmd/nvidia-mig-parted@latest

#FROM ubuntu:24.04
FROM nvidia/cuda:12.6.3-base-ubuntu22.04
ENV NVIDIA_DISABLE_REQUIRE="true"
ENV NVIDIA_VISIBLE_DEVICES=all
ENV NVIDIA_DRIVER_CAPABILITIES=utility

ARG VERSION
LABEL version="$VERSION"
LABEL maintainer="[email protected]"
COPY ./LICENSE /k8s-vgpu/LICENSE
COPY --from=GOBUILD /k8s-vgpu/bin /k8s-vgpu/bin
COPY --from=GOBUILD /go/bin/nvidia-mig-parted /k8s-vgpu/bin/
COPY ./docker/entrypoint.sh /k8s-vgpu/bin/entrypoint.sh
COPY ./docker/vgpu-init.sh /k8s-vgpu/bin/vgpu-init.sh
COPY ./lib /k8s-vgpu/lib
COPY --from=corebuild /k8s-vgpu/lib/nvidia/libvgpu.so."$VERSION" /k8s-vgpu/lib/nvidia/libvgpu.so."$VERSION"

ENV PATH="/k8s-vgpu/bin:${PATH}"
ARG DEST_DIR
ENTRYPOINT ["/bin/bash", "-c", "entrypoint.sh $DEST_DIR"]
Loading