Skip to content

Commit

Permalink
fix: v1 gpu base image name and envs (#1313)
Browse files Browse the repository at this point in the history
Signed-off-by: Keming <kemingyang@tensorchord.ai>

Signed-off-by: Keming <kemingyang@tensorchord.ai>
  • Loading branch information
kemingy committed Dec 16, 2022
1 parent 61215b9 commit 30ff84d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion e2e/v1/docs/testdata/complex/build.envd
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

def build():
base(dev=True)
install.cuda(version="11.2.2", cudnn="8")
install.conda()
install.python()
config.apt_source(
Expand All @@ -29,7 +30,6 @@ deb https://mirror.sjtu.edu.cn/ubuntu focal-security main restricted universe mu
"numpy",
]
)
install.cuda(version="11.2.2", cudnn="8")
shell("zsh")
install.apt_packages(name=["htop"])
git_config(name="Ce Gao", email="cegao@tensorchord.ai", editor="vim")
Expand Down
2 changes: 1 addition & 1 deletion pkg/lang/ir/v1/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ func (g *generalGraph) compileBaseImage() (llb.State, error) {

// Set the environment variables to RuntimeEnviron to keep it in the resulting image.
for _, e := range envs {
kv := strings.Split(e, "=")
kv := strings.SplitN(e, "=", 2)
g.RuntimeEnviron[kv[0]] = kv[1]
}
// TODO: inherit the USER from base
Expand Down
3 changes: 2 additions & 1 deletion pkg/lang/ir/v1/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ func GetCUDAImage(image string, cuda *string, cudnn string, dev bool) string {
if dev {
target = "devel"
}
imageTag := strings.Replace(image, ":", "", 1)

return fmt.Sprintf("docker.io/nvidia:%s-cudnn%s-%s-%s", *cuda, cudnn, target, image)
return fmt.Sprintf("docker.io/nvidia/cuda:%s-cudnn%s-%s-%s", *cuda, cudnn, target, imageTag)
}

0 comments on commit 30ff84d

Please sign in to comment.