-
Notifications
You must be signed in to change notification settings - Fork 316
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate project to use latest operator-sdk(v1.0+) and kubebuilder sty…
…le layout Signed-off-by: Shiva Krishna, Merla <[email protected]>
- Loading branch information
1 parent
5a10b47
commit 66bb874
Showing
93 changed files
with
15,588 additions
and
16,099 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
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,5 @@ | ||
# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file | ||
# Ignore all files which are not go type | ||
!**/*.go | ||
!**/*.mod | ||
!**/*.sum |
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 |
---|---|---|
@@ -1,5 +1,25 @@ | ||
cover.out | ||
/gpu-operator | ||
build/_output/ | ||
|
||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
bin | ||
testbin/* | ||
|
||
# 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 | ||
*.swp | ||
*.swo | ||
*~ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,46 @@ | ||
# Build the manager binary | ||
FROM golang:1.15 as builder | ||
|
||
WORKDIR /workspace | ||
# Copy the Go Modules manifests | ||
COPY go.mod go.mod | ||
COPY go.sum go.sum | ||
# cache deps before building and copying source so that we don't need to re-download as much | ||
# and so that source changes don't invalidate our downloaded layer | ||
RUN go mod download | ||
|
||
# Copy the go source | ||
COPY main.go main.go | ||
COPY api/ api/ | ||
COPY controllers/ controllers/ | ||
|
||
# Build | ||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o gpu-operator main.go | ||
|
||
FROM nvidia/cuda:11.2.1-base-ubi8 | ||
|
||
ENV NVIDIA_DISABLE_REQUIRE="true" | ||
ENV NVIDIA_VISIBLE_DEVICES=all | ||
ENV NVIDIA_DRIVER_CAPABILITIES=utility | ||
|
||
ARG VERSION | ||
|
||
LABEL io.k8s.display-name="NVIDIA GPU Operator" | ||
LABEL name="NVIDIA GPU Operator" | ||
LABEL vendor="NVIDIA" | ||
LABEL version="${VERSION}" | ||
LABEL release="N/A" | ||
LABEL summary="Automate the management and monitoring of NVIDIA GPUs." | ||
LABEL description="See summary" | ||
|
||
WORKDIR / | ||
COPY --from=builder /workspace/gpu-operator /usr/bin/ | ||
|
||
RUN mkdir -p /opt/gpu-operator | ||
COPY assets /opt/gpu-operator/ | ||
COPY ./LICENSE /licenses/LICENSE | ||
|
||
RUN useradd gpu-operator | ||
USER gpu-operator | ||
|
||
ENTRYPOINT ["/usr/bin/gpu-operator"] |
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
Oops, something went wrong.