Files
bd33d545a0 [RayJob] add Light-weight RayJob Submitter (#3943)
* apply from rueian's poc with some modification

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>

* remove runtimeEnvYAML & entrypoint in spec of rayjob sample yaml

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>

* rename lw-submitter yaml metadata name

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>

* remove panic

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>

* update

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>

* add timeout to lw-submitter

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>

* increase timeout

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>

* add e2e test

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>

* add pod log

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>

* update build script

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>

* remove debug log

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>

* update e2e

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>

* add multi-arch build and workflow release image

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>

* remove import of ray utils to minimize binary size

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>

* Update ray-operator/Dockerfile

Co-authored-by: fscnick <[email protected]>
Signed-off-by: Owen Lin (You-Cheng Lin) <[email protected]>

* Apply suggestion from @Future-Outlier

Co-authored-by: Han-Ju Chen (Future-Outlier) <[email protected]>
Signed-off-by: Owen Lin (You-Cheng Lin) <[email protected]>

* Apply suggestion from @Future-Outlier

Co-authored-by: Han-Ju Chen (Future-Outlier) <[email protected]>
Signed-off-by: Owen Lin (You-Cheng Lin) <[email protected]>

* update image release for submitter

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>

* Apply suggestion from @Future-Outlier

Co-authored-by: Han-Ju Chen (Future-Outlier) <[email protected]>
Signed-off-by: Owen Lin (You-Cheng Lin) <[email protected]>

* update comment in build-and-load-submitter script

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>

* remove trimpath flag

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>

* remove -a flag in make rayjobsubmitter

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>

* update

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>

* add testing submitter log and failed job submitter pod number

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>

* add flag description

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>

* rename rayjobsubmitter to rayjob-subitter

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>

* use existing function in dashboard client

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>

* fix indent

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>

* modify existing submission id msg

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>

* rename func

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>

* modify error msg

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>

* rename e2e test title name

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>

* fix test

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>

* fix test

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>

* fix test

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>

* fix test

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>

* fix test

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>

* fix comment

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>

* check submit job request status code

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>

* check log in e2e

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>

* fix test

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>

* Update ray-operator/controllers/ray/utils/dashboardclient/dashboard_httpclient.go

Signed-off-by: Rueian <[email protected]>

* update

Signed-off-by: Future-Outlier <[email protected]>

---------

Signed-off-by: You-Cheng Lin (Owen) <[email protected]>
Signed-off-by: Owen Lin (You-Cheng Lin) <[email protected]>
Signed-off-by: Rueian <[email protected]>
Signed-off-by: Future-Outlier <[email protected]>
Co-authored-by: fscnick <[email protected]>
Co-authored-by: Han-Ju Chen (Future-Outlier) <[email protected]>
Co-authored-by: Rueian <[email protected]>
2025-09-10 08:48:38 +08:00

40 lines
1.1 KiB
Docker

# Build the manager binary
FROM golang:1.24.0-bullseye 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 apis/ apis/
COPY controllers/ controllers/
COPY pkg/features pkg/features
COPY pkg/utils pkg/utils
COPY pkg/webhooks pkg/webhooks
COPY rayjob-submitter/ rayjob-submitter/
# Build
USER root
RUN CGO_ENABLED=1 GOOS=linux go build -tags strictfipsruntime -a -o manager main.go
# Build the submitter binary with -ldflags="-w -s" to reduce the size of the binary.
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-w -s" -a -o submitter ./rayjob-submitter/cmd/main.go
FROM scratch AS submitter
WORKDIR /
COPY --from=builder /workspace/submitter .
USER 65532:65532
ENTRYPOINT ["/submitter"]
FROM gcr.io/distroless/base-debian12:nonroot
WORKDIR /
COPY --from=builder /workspace/manager .
USER 65532:65532
ENTRYPOINT ["/manager"]