Skip to content

Commit 3ab642a

Browse files
authored
Propagate R8_COG_VERSION on fast push (#2166)
1 parent 0c6c0be commit 3ab642a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

pkg/docker/command/manifest.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ type Manifest struct {
1212
}
1313

1414
const UvPythonInstallDirEnvVarName = "UV_PYTHON_INSTALL_DIR"
15+
const R8CogVersionEnvVarName = "R8_COG_VERSION"
1516
const R8TorchVersionEnvVarName = "R8_TORCH_VERSION"
1617
const R8CudaVersionEnvVarName = "R8_CUDA_VERSION"
1718
const R8CudnnVersionEnvVarName = "R8_CUDNN_VERSION"

pkg/web/client.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ type Env struct {
5151
CogTrainCodeStrip string `json:"COG_TRAIN_CODE_STRIP"`
5252
CogPyEnvPath string `json:"COG_PYENV_PATH"`
5353
CogEagerImports string `json:"COG_EAGER_IMPORTS"`
54+
R8CogVersion string `json:"R8_COG_VERSION"`
5455
R8CudaVersion string `json:"R8_CUDA_VERSION"`
5556
R8CudnnVersion string `json:"R8_CUDNN_VERSION"`
5657
R8PythonVersion string `json:"R8_PYTHON_VERSION"`
@@ -179,6 +180,7 @@ func (c *Client) versionFromManifest(image string, weights []File, files []File)
179180
cogGPU = 1
180181
}
181182

183+
cogVersion := ""
182184
torchVersion := ""
183185
cudaVersion := ""
184186
cudnnVersion := ""
@@ -190,6 +192,8 @@ func (c *Client) versionFromManifest(image string, weights []File, files []File)
190192
continue
191193
}
192194
switch envName {
195+
case command.R8CogVersionEnvVarName:
196+
cogVersion = envValue
193197
case command.R8TorchVersionEnvVarName:
194198
torchVersion = envValue
195199
case command.R8CudaVersionEnvVarName:
@@ -216,6 +220,7 @@ func (c *Client) versionFromManifest(image string, weights []File, files []File)
216220
CogTrainCodeStrip: trainCode,
217221
CogPyEnvPath: pythonPath,
218222
CogEagerImports: eagerImports,
223+
R8CogVersion: cogVersion,
219224
R8CudaVersion: cudaVersion,
220225
R8CudnnVersion: cudnnVersion,
221226
R8PythonVersion: pythonVersion,

0 commit comments

Comments
 (0)