Skip to content

Commit

Permalink
bug: Use git version by default when build ssh (#688)
Browse files Browse the repository at this point in the history
* use git version by default

Signed-off-by: Jinjing.Zhou <[email protected]>

* fix

Signed-off-by: Jinjing.Zhou <[email protected]>
  • Loading branch information
VoVAllen authored Jul 29, 2022
1 parent df9bd6a commit 1f4b468
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion base-images/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

ROOT_DIR=`dirname $0`

ENVD_VERSION="${ENVD_VERSION:-0.0.1}"
GIT_TAG_VERSION=$(git describe --tags --abbrev=0)
ENVD_VERSION="${ENVD_VERSION:-$GIT_TAG_VERSION}"
DOCKER_HUB_ORG="${DOCKER_HUB_ORG:-tensorchord}"
PYTHON_VERSION="${PYTHON_VERSION:-3.9}"
ENVD_OS="${ENVD_OS:-ubuntu20.04}"
Expand Down
3 changes: 2 additions & 1 deletion pkg/lang/ir/python.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,13 @@ func (g Graph) compilePyPIPackages(root llb.State) llb.State {
// Compose the package install command.
var sb strings.Builder
// Always use the conda's pip.
sb.WriteString("/opt/conda/bin/conda run -n envd pip install")
sb.WriteString("/opt/conda/envs/envd/bin/python -m pip install")
for _, pkg := range g.PyPIPackages {
sb.WriteString(fmt.Sprintf(" %s", pkg))
}

cmd := sb.String()
logrus.Debugf("pip command: %s", cmd)
root = llb.User("envd")(root)
// Refer to https://github.com/moby/buildkit/blob/31054718bf775bf32d1376fe1f3611985f837584/frontend/dockerfile/dockerfile2llb/convert_runmount.go#L46
cache := root.File(llb.Mkdir("/cache",
Expand Down

0 comments on commit 1f4b468

Please sign in to comment.