Skip to content

Commit

Permalink
fix: Use docker-container as the buildkitd socket (#72)
Browse files Browse the repository at this point in the history
Signed-off-by: Ce Gao <cegao@tensorchord.ai>
  • Loading branch information
gaocegege committed Apr 27, 2022
1 parent 758bc0f commit 2ad4d94
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 2 additions & 3 deletions cmd/midi/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ func build(clicontext *cli.Context) error {

tag := clicontext.String("tag")

builder := builder.New(
fmt.Sprintf("docker-container://%s", viper.GetString(flag.FlagBuildkitdContainer)),
config, path, tag)
builder := builder.New(fmt.Sprintf("docker-container://%s",
viper.GetString(flag.FlagBuildkitdContainer)), config, path, tag)
return builder.Build(clicontext.Context)
}
6 changes: 5 additions & 1 deletion cmd/midi/up.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,17 @@
package main

import (
"fmt"
"path/filepath"

"github.com/cockroachdb/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/viper"
cli "github.com/urfave/cli/v2"

"github.com/tensorchord/MIDI/pkg/builder"
"github.com/tensorchord/MIDI/pkg/docker"
"github.com/tensorchord/MIDI/pkg/flag"
"github.com/tensorchord/MIDI/pkg/home"
"github.com/tensorchord/MIDI/pkg/ssh"
)
Expand Down Expand Up @@ -68,7 +71,8 @@ func up(clicontext *cli.Context) error {

tag := clicontext.String("tag")

builder := builder.New("unix:///run/buildkit/buildkitd.sock", config, path, tag)
builder := builder.New(fmt.Sprintf("docker-container://%s",
viper.GetString(flag.FlagBuildkitdContainer)), config, path, tag)
if err := builder.Build(clicontext.Context); err != nil {
return err
}
Expand Down

0 comments on commit 2ad4d94

Please sign in to comment.