Skip to content

Commit 7e99151

Browse files
authored
fix: operator.Dockerfile (#312)
1 parent a575def commit 7e99151

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

dockerfile/operator.Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ COPY go.mod go.mod
1010
COPY go.sum go.sum
1111
# cache deps before building and copying source so that we don't need to re-download as much
1212
# and so that source changes don't invalidate our downloaded layer
13-
RUN go mod vendor
1413

1514
# Copy the go source
1615
COPY cmd/ cmd/
@@ -21,7 +20,7 @@ COPY .git/ .git/
2120

2221
COPY scripts/ scripts/
2322
COPY patches/ patches/
24-
RUN bash ./scripts/patch-scheduler.sh
23+
RUN go mod vendor && bash ./scripts/patch-scheduler.sh
2524

2625
# Build
2726
# the GOARCH has not a default value to allow the binary be built according to the host where the command
@@ -38,3 +37,6 @@ COPY --from=builder /workspace/manager .
3837
USER 65532:65532
3938

4039
ENTRYPOINT ["/manager"]
40+
41+
# Run locally
42+
# docker build --build-arg TARGETOS=linux --build-arg TARGETARCH=amd64 --build-arg GO_LDFLAGS="-X 'github.com/NexusGPU/tensor-fusion/internal/version.BuildVersion=dev-test'" -t tensorfusion/tensor-fusion-operator:tmp-test . -f dockerfile/operator.Dockerfile

0 commit comments

Comments
 (0)