tensorchord/envd

bug: build image error when using moby worker in docker 23.0.1

xieydd opened this issue · 2 comments

Are you use the envd server?

  • Yes, I am using the envd server.
  • No, I am not using the envd server.

Describe the bug

When I tried to build the image, I found that the build reported an error, as seen in:

time="2023-03-21T15:13:55+08:00" level=debug msg="apt/pypi calculated cacheID: /var/cache/apt/modelz-alpaca-lora-cpu"
time="2023-03-21T15:13:55+08:00" level=debug msg="apt/pypi calculated cacheID: /var/lib/apt/modelz-alpaca-lora-cpu"
time="2023-03-21T15:13:55+08:00" level=debug msg="Configure pip install requirements statements" file=requirements.txt
time="2023-03-21T15:13:55+08:00" level=debug msg="apt/pypi calculated cacheID: /root/.cache/pip/modelz-alpaca-lora-cpu"
time="2023-03-21T15:13:55+08:00" level=debug msg="compiled build.envd" language-version=v1 tag="modelz-alpaca-lora:dev"
time="2023-03-21T15:13:55+08:00" level=debug msg="building envd image" language-version=v1 tag="modelz-alpaca-lora:dev"
time="2023-03-21T15:13:55+08:00" level=debug msg="build image with buildkit" language-version=v1 tag="modelz-alpaca-lora:dev" type=image
time="2023-03-21T15:13:55+08:00" level=debug msg="serving grpc connection"
time="2023-03-21T15:13:55+08:00" level=debug msg="stopping session"
time="2023-03-21T15:13:58+08:00" level=debug msg="sending telemetry track event" UID=5d79a818-089d-42ff-b1ce-2c3c8793216a command=build
error: failed to build the image: failed to build: failed to wait error group: failed to solve LLB: failed to solve: exporter "image" could not be found
(1) attached stack trace
  -- stack trace:
  | github.com/tensorchord/envd/pkg/app/build.BuildImage
  | 	/home/runner/work/envd/envd/pkg/app/build/build.go:81
  | github.com/tensorchord/envd/pkg/app.build
  | 	/home/runner/work/envd/envd/pkg/app/build.go:116
  | github.com/urfave/cli/v2.(*Command).Run
  | 	/home/runner/go/pkg/mod/github.com/urfave/cli/v2@v2.25.0/command.go:273
  | github.com/urfave/cli/v2.(*Command).Run
  | 	/home/runner/go/pkg/mod/github.com/urfave/cli/v2@v2.25.0/command.go:266
  | github.com/urfave/cli/v2.(*App).RunContext
  | 	/home/runner/go/pkg/mod/github.com/urfave/cli/v2@v2.25.0/app.go:332
  | github.com/urfave/cli/v2.(*App).Run
  | 	/home/runner/go/pkg/mod/github.com/urfave/cli/v2@v2.25.0/app.go:309
  | main.run
  | 	/home/runner/work/envd/envd/cmd/envd/main.go:39
  | main.main
  | 	/home/runner/work/envd/envd/cmd/envd/main.go:67
  | runtime.main
  | 	/opt/hostedtoolcache/go/1.19.7/x64/src/runtime/proc.go:250
Wraps: (2) failed to build the image
Wraps: (3) attached stack trace
  -- stack trace:
  | github.com/tensorchord/envd/pkg/builder.generalBuilder.Build
  | 	/home/runner/work/envd/envd/pkg/builder/build.go:138
  | github.com/tensorchord/envd/pkg/app/build.BuildImage
  | 	/home/runner/work/envd/envd/pkg/app/build/build.go:80
  | github.com/tensorchord/envd/pkg/app.build
  | 	/home/runner/work/envd/envd/pkg/app/build.go:116
  | github.com/urfave/cli/v2.(*Command).Run
  | 	/home/runner/go/pkg/mod/github.com/urfave/cli/v2@v2.25.0/command.go:273
  | github.com/urfave/cli/v2.(*Command).Run
  | 	/home/runner/go/pkg/mod/github.com/urfave/cli/v2@v2.25.0/command.go:266
  | github.com/urfave/cli/v2.(*App).RunContext
  | 	/home/runner/go/pkg/mod/github.com/urfave/cli/v2@v2.25.0/app.go:332
  | github.com/urfave/cli/v2.(*App).Run
  | 	/home/runner/go/pkg/mod/github.com/urfave/cli/v2@v2.25.0/app.go:309
  | main.run
  | 	/home/runner/work/envd/envd/cmd/envd/main.go:39
  | main.main
  | 	/home/runner/work/envd/envd/cmd/envd/main.go:67
  | runtime.main
  | 	/opt/hostedtoolcache/go/1.19.7/x64/src/runtime/proc.go:250
Wraps: (4) failed to build
Wraps: (5) attached stack trace
  -- stack trace:
  | github.com/tensorchord/envd/pkg/builder.generalBuilder.build
  | 	/home/runner/work/envd/envd/pkg/builder/build.go:303
  | github.com/tensorchord/envd/pkg/builder.generalBuilder.Build
  | 	/home/runner/work/envd/envd/pkg/builder/build.go:137
  | github.com/tensorchord/envd/pkg/app/build.BuildImage
  | 	/home/runner/work/envd/envd/pkg/app/build/build.go:80
  | github.com/tensorchord/envd/pkg/app.build
  | 	/home/runner/work/envd/envd/pkg/app/build.go:116
  | github.com/urfave/cli/v2.(*Command).Run
  | 	/home/runner/go/pkg/mod/github.com/urfave/cli/v2@v2.25.0/command.go:273
  | github.com/urfave/cli/v2.(*Command).Run
  | 	/home/runner/go/pkg/mod/github.com/urfave/cli/v2@v2.25.0/command.go:266
  | github.com/urfave/cli/v2.(*App).RunContext
  | 	/home/runner/go/pkg/mod/github.com/urfave/cli/v2@v2.25.0/app.go:332
  | github.com/urfave/cli/v2.(*App).Run
  | 	/home/runner/go/pkg/mod/github.com/urfave/cli/v2@v2.25.0/app.go:309
  | main.run
  | 	/home/runner/work/envd/envd/cmd/envd/main.go:39
  | main.main
  | 	/home/runner/work/envd/envd/cmd/envd/main.go:67
  | runtime.main
  | 	/opt/hostedtoolcache/go/1.19.7/x64/src/runtime/proc.go:250
Wraps: (6) failed to wait error group
Wraps: (7) attached stack trace
  -- stack trace:
  | github.com/tensorchord/envd/pkg/builder.generalBuilder.build.func3.1
  | 	/home/runner/work/envd/envd/pkg/builder/build.go:278
  | golang.org/x/sync/errgroup.(*Group).Go.func1
  | 	/home/runner/go/pkg/mod/golang.org/x/sync@v0.1.0/errgroup/errgroup.go:75
Wraps: (8) failed to solve LLB
Wraps: (9)
  -- stack trace:
  | github.com/moby/buildkit/client.(*Client).solve.func2
  | 	/home/runner/go/pkg/mod/github.com/moby/buildkit@v0.11.4/client/solve.go:273
  | [...repeated from below...]
Wraps: (10) failed to solve
Wraps: (11)
  -- stack trace:
  | github.com/moby/buildkit/util/stack.Enable
  | 	/home/runner/go/pkg/mod/github.com/moby/buildkit@v0.11.4/util/stack/stack.go:77
  | github.com/moby/buildkit/util/grpcerrors.FromGRPC
  | 	/home/runner/go/pkg/mod/github.com/moby/buildkit@v0.11.4/util/grpcerrors/grpcerrors.go:197
  | github.com/moby/buildkit/util/grpcerrors.UnaryClientInterceptor
  | 	/home/runner/go/pkg/mod/github.com/moby/buildkit@v0.11.4/util/grpcerrors/intercept.go:41
  | google.golang.org/grpc.(*ClientConn).Invoke
  | 	/home/runner/go/pkg/mod/google.golang.org/grpc@v1.53.0/call.go:35
  | github.com/moby/buildkit/api/services/control.(*controlClient).Solve
  | 	/home/runner/go/pkg/mod/github.com/moby/buildkit@v0.11.4/api/services/control/control.pb.go:2208
  | github.com/moby/buildkit/client.(*Client).solve.func2
  | 	/home/runner/go/pkg/mod/github.com/moby/buildkit@v0.11.4/client/solve.go:258
  | golang.org/x/sync/errgroup.(*Group).Go.func1
  | 	/home/runner/go/pkg/mod/golang.org/x/sync@v0.1.0/errgroup/errgroup.go:75
  | runtime.goexit
  | 	/opt/hostedtoolcache/go/1.19.7/x64/src/runtime/asm_amd64.s:1594
Wraps: (12)
Wraps: (13) exporter "image" could not be found
Error types: (1) *withstack.withStack (2) *errutil.withPrefix (3) *withstack.withStack (4) *errutil.withPrefix (5) *withstack.withStack (6) *errutil.withPrefix (7) *withstack.withStack (8) *errutil.withPrefix (9) *errors.withStack (10) *errors.withMessage (11) *errors.withStack (12) *stack.withStack (13) *grpcerrors.grpcStatusError
error: exporter "image" could not be found

may be releated to this pr #1472

To Reproduce

git clone https://github.com/xieydd/modelz-alpaca-lora && cd modelz-alpaca-lora
envd build --tag gradio-alpaca-lora:2023-03-21-3 --output type=image,name=docker.io/xieydd/gradio-alpaca-lora:2023-03-21-3,push=true

Expected behavior

No response

The docker info output

Docker-CE: 23.0.1

The envd version output

envd: v0.3.14
BuildDate: 2023-03-17T07:36:06Z
GitCommit: a7af1f2
GitTreeState: clean
GitTag: v0.3.14
GoVersion: go1.19.7
Compiler: gc
Platform: linux/amd64

Additional context

No response

Me too. But restarting the computer fixed it. :(

I have changed the context to docker container, temporary solution :)