Skip to content

Commit

Permalink
feat: add environment name as label (#1135)
Browse files Browse the repository at this point in the history
* add

Signed-off-by: Jinjing.Zhou <allenzhou@tensorchord.ai>

* fix lint

Signed-off-by: Jinjing.Zhou <allenzhou@tensorchord.ai>

* fix

Signed-off-by: Jinjing.Zhou <allenzhou@tensorchord.ai>

* add label

Signed-off-by: Jinjing.Zhou <allenzhou@tensorchord.ai>

* fix

Signed-off-by: Jinjing.Zhou <allenzhou@tensorchord.ai>

* fix

Signed-off-by: Jinjing.Zhou <allenzhou@tensorchord.ai>

Signed-off-by: Jinjing.Zhou <allenzhou@tensorchord.ai>
  • Loading branch information
VoVAllen authored Nov 2, 2022
1 parent bc1c513 commit a2aa9fe
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
1 change: 1 addition & 0 deletions pkg/lang/ir/compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ func (g Graph) Labels() (map[string]string, error) {
}
labels[types.ImageLabelRepo] = string(repoInfo)

labels[types.ImageLabelContainerName] = string(g.EnvironmentName)
return labels, nil
}

Expand Down
25 changes: 13 additions & 12 deletions pkg/types/label.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,19 @@ const (
ContainerLabelRStudioServerAddr = "ai.tensorchord.envd.rstudio.server.address"
ContainerLabelSSHPort = "ai.tensorchord.envd.ssh.port"

ImageLabelVendor = "ai.tensorchord.envd.vendor"
ImageLabelGPU = "ai.tensorchord.envd.gpu"
ImageLabelRepo = "ai.tensorchord.envd.repo"
ImageLabelPorts = "ai.tensorchord.envd.ports"
ImageLabelAPT = "ai.tensorchord.envd.apt.packages"
ImageLabelPyPI = "ai.tensorchord.envd.pypi.commands"
ImageLabelR = "ai.tensorchord.envd.r.packages"
ImageLabelCUDA = "ai.tensorchord.envd.gpu.cuda"
ImageLabelCUDNN = "ai.tensorchord.envd.gpu.cudnn"
ImageLabelContext = "ai.tensorchord.envd.build.context"
ImageLabelCacheHash = "ai.tensorchord.envd.build.digest"
RuntimeGraphCode = "ai.tensorchord.envd.runtimeGraph"
ImageLabelContainerName = "ai.tensorchord.envd.container.name"
ImageLabelVendor = "ai.tensorchord.envd.vendor"
ImageLabelGPU = "ai.tensorchord.envd.gpu"
ImageLabelRepo = "ai.tensorchord.envd.repo"
ImageLabelPorts = "ai.tensorchord.envd.ports"
ImageLabelAPT = "ai.tensorchord.envd.apt.packages"
ImageLabelPyPI = "ai.tensorchord.envd.pypi.commands"
ImageLabelR = "ai.tensorchord.envd.r.packages"
ImageLabelCUDA = "ai.tensorchord.envd.gpu.cuda"
ImageLabelCUDNN = "ai.tensorchord.envd.gpu.cudnn"
ImageLabelContext = "ai.tensorchord.envd.build.context"
ImageLabelCacheHash = "ai.tensorchord.envd.build.digest"
RuntimeGraphCode = "ai.tensorchord.envd.runtimeGraph"

ImageVendorEnvd = "envd"
)

0 comments on commit a2aa9fe

Please sign in to comment.