Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
songlinfeng
container-toolkit
Commits
48c080c4
Commit
48c080c4
authored
Nov 11, 2025
by
songlinfeng
Browse files
rename dcu-ctk dcu-container-toolkit
parent
0ccfece1
Changes
126
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
37 additions
and
37 deletions
+37
-37
internal/config/image/dtk_image.go
internal/config/image/dtk_image.go
+2
-2
internal/config/image/envvars.go
internal/config/image/envvars.go
+1
-1
internal/config/toml.go
internal/config/toml.go
+3
-3
internal/config/toolkit-cli.go
internal/config/toolkit-cli.go
+1
-1
internal/dcu-tracker/dcu-tracker.go
internal/dcu-tracker/dcu-tracker.go
+1
-1
internal/discover/addtional_gids.go
internal/discover/addtional_gids.go
+2
-2
internal/discover/char_devices.go
internal/discover/char_devices.go
+2
-2
internal/discover/drm_bypath_hooks.go
internal/discover/drm_bypath_hooks.go
+2
-2
internal/discover/filter.go
internal/discover/filter.go
+1
-1
internal/discover/graphics.go
internal/discover/graphics.go
+5
-5
internal/discover/hooks.go
internal/discover/hooks.go
+2
-2
internal/discover/mofed.go
internal/discover/mofed.go
+1
-1
internal/discover/mounts-to-container-path.go
internal/discover/mounts-to-container-path.go
+2
-2
internal/discover/mounts.go
internal/discover/mounts.go
+2
-2
internal/discover/pci_mounts.go
internal/discover/pci_mounts.go
+2
-2
internal/edits/device.go
internal/edits/device.go
+1
-1
internal/edits/edits.go
internal/edits/edits.go
+3
-3
internal/edits/hook.go
internal/edits/hook.go
+1
-1
internal/edits/mount.go
internal/edits/mount.go
+1
-1
internal/info/auto.go
internal/info/auto.go
+2
-2
No files found.
internal/config/image/dtk_image.go
View file @
48c080c4
...
@@ -8,7 +8,7 @@ import (
...
@@ -8,7 +8,7 @@ import (
"fmt"
"fmt"
"path/filepath"
"path/filepath"
"strings"
"strings"
"d
tk
-container-toolkit/internal/hydcu"
"d
cu
-container-toolkit/internal/hydcu"
"strconv"
"strconv"
"github.com/opencontainers/runtime-spec/specs-go"
"github.com/opencontainers/runtime-spec/specs-go"
"tags.cncf.io/container-device-interface/pkg/parser"
"tags.cncf.io/container-device-interface/pkg/parser"
...
@@ -218,7 +218,7 @@ func (i DTK) CDIDevicesFromMounts() []string {
...
@@ -218,7 +218,7 @@ func (i DTK) CDIDevicesFromMounts() []string {
}
}
// VisibleDevicesFromEnvVar returns the set of visible devices requested through
// VisibleDevicesFromEnvVar returns the set of visible devices requested through
// the D
TK
_VISIBLE_DEVICES environment variable.
// the D
CU
_VISIBLE_DEVICES environment variable.
func
(
i
DTK
)
VisibleDevicesFromEnvVar
()
[]
string
{
func
(
i
DTK
)
VisibleDevicesFromEnvVar
()
[]
string
{
return
i
.
DevicesFromEnvvars
(
EnvVarDTKVisibleDevices
,
EnvVarNvidiaVisibleDevices
)
.
List
()
return
i
.
DevicesFromEnvvars
(
EnvVarDTKVisibleDevices
,
EnvVarNvidiaVisibleDevices
)
.
List
()
}
}
internal/config/image/envvars.go
View file @
48c080c4
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
package
image
package
image
const
(
const
(
EnvVarDTKVisibleDevices
=
"D
TK
_VISIBLE_DEVICES"
EnvVarDTKVisibleDevices
=
"D
CU
_VISIBLE_DEVICES"
EnvVarNvidiaVisibleDevices
=
"NVIDIA_VISIBLE_DEVICES"
EnvVarNvidiaVisibleDevices
=
"NVIDIA_VISIBLE_DEVICES"
EnvROCmVersion
=
"ROCM_VERSION"
EnvROCmVersion
=
"ROCM_VERSION"
)
)
internal/config/toml.go
View file @
48c080c4
...
@@ -172,11 +172,11 @@ func (t *Toml) commentDefaults() *Toml {
...
@@ -172,11 +172,11 @@ func (t *Toml) commentDefaults() *Toml {
"accept-dtk-visible-devices-as-volume-mounts"
:
false
,
"accept-dtk-visible-devices-as-volume-mounts"
:
false
,
"dtk-container-cli.root"
:
"/run/dtk/driver"
,
"dtk-container-cli.root"
:
"/run/dtk/driver"
,
"dtk-container-cli.path"
:
"/usr/bin/dtk-container-cli"
,
"dtk-container-cli.path"
:
"/usr/bin/dtk-container-cli"
,
"dtk-container-cli.debug"
:
"/var/log/d
tk
-container-toolkit.log"
,
"dtk-container-cli.debug"
:
"/var/log/d
cu
-container-toolkit.log"
,
"dtk-container-cli.ldcache"
:
"/etc/ld.so.cache"
,
"dtk-container-cli.ldcache"
:
"/etc/ld.so.cache"
,
"dtk-container-cli.no-cgroups"
:
false
,
"dtk-container-cli.no-cgroups"
:
false
,
"dtk-container-cli.user"
:
"root:video"
,
"dtk-container-cli.user"
:
"root:video"
,
"d
tk
-container-runtime.debug"
:
"/var/log/d
tk
-container-runtime.log"
,
"d
cu
-container-runtime.debug"
:
"/var/log/d
cu
-container-runtime.log"
,
}
}
for
k
,
v
:=
range
commentedDefaults
{
for
k
,
v
:=
range
commentedDefaults
{
set
:=
asToml
.
Get
(
k
)
set
:=
asToml
.
Get
(
k
)
...
@@ -192,7 +192,7 @@ func shouldComment(key string, defaultValue interface{}, setTo interface{}) bool
...
@@ -192,7 +192,7 @@ func shouldComment(key string, defaultValue interface{}, setTo interface{}) bool
if
key
==
"dtk-container-cli.user"
&&
defaultValue
==
setTo
&&
isSuse
()
{
if
key
==
"dtk-container-cli.user"
&&
defaultValue
==
setTo
&&
isSuse
()
{
return
false
return
false
}
}
if
key
==
"d
tk
-container-runtime.debug"
&&
setTo
==
"/dev/null"
{
if
key
==
"d
cu
-container-runtime.debug"
&&
setTo
==
"/dev/null"
{
return
true
return
true
}
}
if
setTo
==
nil
||
defaultValue
==
setTo
||
setTo
==
""
{
if
setTo
==
nil
||
defaultValue
==
setTo
||
setTo
==
""
{
...
...
internal/config/toolkit-cli.go
View file @
48c080c4
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
package
config
package
config
// CTKConfig stores the config options for the DTK Container Toolkit CLI (d
tk
-ctk)
// CTKConfig stores the config options for the DTK Container Toolkit CLI (d
cu
-ctk)
type
CTKConfig
struct
{
type
CTKConfig
struct
{
Path
string
`toml:"path"`
Path
string
`toml:"path"`
}
}
internal/dcu-tracker/dcu-tracker.go
View file @
48c080c4
package
dcuTracker
package
dcuTracker
import
(
import
(
"d
tk
-container-toolkit/internal/hydcu"
"d
cu
-container-toolkit/internal/hydcu"
"encoding/json"
"encoding/json"
"fmt"
"fmt"
"os"
"os"
...
...
internal/discover/addtional_gids.go
View file @
48c080c4
...
@@ -5,8 +5,8 @@
...
@@ -5,8 +5,8 @@
package
discover
package
discover
import
(
import
(
"d
tk
-container-toolkit/internal/info"
"d
cu
-container-toolkit/internal/info"
"d
tk
-container-toolkit/internal/logger"
"d
cu
-container-toolkit/internal/logger"
"os/user"
"os/user"
"strconv"
"strconv"
)
)
...
...
internal/discover/char_devices.go
View file @
48c080c4
...
@@ -5,8 +5,8 @@
...
@@ -5,8 +5,8 @@
package
discover
package
discover
import
(
import
(
"d
tk
-container-toolkit/internal/logger"
"d
cu
-container-toolkit/internal/logger"
"d
tk
-container-toolkit/internal/lookup"
"d
cu
-container-toolkit/internal/lookup"
)
)
// charDevices is a discover for a list of character devices
// charDevices is a discover for a list of character devices
...
...
internal/discover/drm_bypath_hooks.go
View file @
48c080c4
...
@@ -5,8 +5,8 @@
...
@@ -5,8 +5,8 @@
package
discover
package
discover
import
(
import
(
"d
tk
-container-toolkit/internal/logger"
"d
cu
-container-toolkit/internal/logger"
"d
tk
-container-toolkit/internal/lookup"
"d
cu
-container-toolkit/internal/lookup"
"fmt"
"fmt"
"os"
"os"
"path/filepath"
"path/filepath"
...
...
internal/discover/filter.go
View file @
48c080c4
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
package
discover
package
discover
import
(
import
(
"d
tk
-container-toolkit/internal/logger"
"d
cu
-container-toolkit/internal/logger"
)
)
// Filter defines an interface for filtering discovered entities
// Filter defines an interface for filtering discovered entities
...
...
internal/discover/graphics.go
View file @
48c080c4
...
@@ -5,11 +5,11 @@
...
@@ -5,11 +5,11 @@
package
discover
package
discover
import
(
import
(
"d
tk
-container-toolkit/internal/config/image"
"d
cu
-container-toolkit/internal/config/image"
"d
tk
-container-toolkit/internal/info/drm"
"d
cu
-container-toolkit/internal/info/drm"
"d
tk
-container-toolkit/internal/logger"
"d
cu
-container-toolkit/internal/logger"
"d
tk
-container-toolkit/internal/lookup"
"d
cu
-container-toolkit/internal/lookup"
"d
tk
-container-toolkit/internal/lookup/root"
"d
cu
-container-toolkit/internal/lookup/root"
"fmt"
"fmt"
"os"
"os"
)
)
...
...
internal/discover/hooks.go
View file @
48c080c4
...
@@ -62,7 +62,7 @@ func CreateDtkTrackHook(path string, s string, s2 string, id string) Hook {
...
@@ -62,7 +62,7 @@ func CreateDtkTrackHook(path string, s string, s2 string, id string) Hook {
return
Hook
{
return
Hook
{
Lifecycle
:
cdi
.
PoststopHook
,
Lifecycle
:
cdi
.
PoststopHook
,
Path
:
path
,
Path
:
path
,
Args
:
[]
string
{
"d
tk
-ctk"
,
s
,
s2
,
id
},
Args
:
[]
string
{
"d
cu
-ctk"
,
s
,
s2
,
id
},
}
}
}
}
...
@@ -82,7 +82,7 @@ func (c cdiHook) Create(name string, args ...string) Hook {
...
@@ -82,7 +82,7 @@ func (c cdiHook) Create(name string, args ...string) Hook {
}
}
func
(
c
cdiHook
)
requiredArgs
(
name
string
)
[]
string
{
func
(
c
cdiHook
)
requiredArgs
(
name
string
)
[]
string
{
base
:=
filepath
.
Base
(
string
(
c
))
base
:=
filepath
.
Base
(
string
(
c
))
if
base
==
"d
tk
-ctk"
{
if
base
==
"d
cu
-ctk"
{
return
[]
string
{
base
,
"hook"
,
name
}
return
[]
string
{
base
,
"hook"
,
name
}
}
}
return
[]
string
{
base
,
name
}
return
[]
string
{
base
,
name
}
...
...
internal/discover/mofed.go
View file @
48c080c4
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
package
discover
package
discover
import
"d
tk
-container-toolkit/internal/logger"
import
"d
cu
-container-toolkit/internal/logger"
// NewMOFEDDiscoverer creates a discoverer for MOFED devices.
// NewMOFEDDiscoverer creates a discoverer for MOFED devices.
func
NewMOFEDDiscoverer
(
logger
logger
.
Interface
,
devRoot
string
)
(
Discover
,
error
)
{
func
NewMOFEDDiscoverer
(
logger
logger
.
Interface
,
devRoot
string
)
(
Discover
,
error
)
{
...
...
internal/discover/mounts-to-container-path.go
View file @
48c080c4
...
@@ -5,8 +5,8 @@
...
@@ -5,8 +5,8 @@
package
discover
package
discover
import
(
import
(
"d
tk
-container-toolkit/internal/logger"
"d
cu
-container-toolkit/internal/logger"
"d
tk
-container-toolkit/internal/lookup"
"d
cu
-container-toolkit/internal/lookup"
"fmt"
"fmt"
"path/filepath"
"path/filepath"
"strings"
"strings"
...
...
internal/discover/mounts.go
View file @
48c080c4
...
@@ -5,8 +5,8 @@
...
@@ -5,8 +5,8 @@
package
discover
package
discover
import
(
import
(
"d
tk
-container-toolkit/internal/logger"
"d
cu
-container-toolkit/internal/logger"
"d
tk
-container-toolkit/internal/lookup"
"d
cu
-container-toolkit/internal/lookup"
"fmt"
"fmt"
"path/filepath"
"path/filepath"
"strings"
"strings"
...
...
internal/discover/pci_mounts.go
View file @
48c080c4
...
@@ -5,8 +5,8 @@
...
@@ -5,8 +5,8 @@
package
discover
package
discover
import
(
import
(
"d
tk
-container-toolkit/internal/logger"
"d
cu
-container-toolkit/internal/logger"
"d
tk
-container-toolkit/internal/lookup"
"d
cu
-container-toolkit/internal/lookup"
"fmt"
"fmt"
"os"
"os"
"path/filepath"
"path/filepath"
...
...
internal/edits/device.go
View file @
48c080c4
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
package
edits
package
edits
import
(
import
(
"d
tk
-container-toolkit/internal/discover"
"d
cu
-container-toolkit/internal/discover"
"os"
"os"
"tags.cncf.io/container-device-interface/pkg/cdi"
"tags.cncf.io/container-device-interface/pkg/cdi"
...
...
internal/edits/edits.go
View file @
48c080c4
...
@@ -5,9 +5,9 @@
...
@@ -5,9 +5,9 @@
package
edits
package
edits
import
(
import
(
"d
tk
-container-toolkit/internal/discover"
"d
cu
-container-toolkit/internal/discover"
"d
tk
-container-toolkit/internal/logger"
"d
cu
-container-toolkit/internal/logger"
"d
tk
-container-toolkit/internal/oci"
"d
cu
-container-toolkit/internal/oci"
"fmt"
"fmt"
"tags.cncf.io/container-device-interface/pkg/cdi"
"tags.cncf.io/container-device-interface/pkg/cdi"
...
...
internal/edits/hook.go
View file @
48c080c4
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
package
edits
package
edits
import
(
import
(
"d
tk
-container-toolkit/internal/discover"
"d
cu
-container-toolkit/internal/discover"
"tags.cncf.io/container-device-interface/pkg/cdi"
"tags.cncf.io/container-device-interface/pkg/cdi"
"tags.cncf.io/container-device-interface/specs-go"
"tags.cncf.io/container-device-interface/specs-go"
...
...
internal/edits/mount.go
View file @
48c080c4
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
package
edits
package
edits
import
(
import
(
"d
tk
-container-toolkit/internal/discover"
"d
cu
-container-toolkit/internal/discover"
"tags.cncf.io/container-device-interface/pkg/cdi"
"tags.cncf.io/container-device-interface/pkg/cdi"
"tags.cncf.io/container-device-interface/specs-go"
"tags.cncf.io/container-device-interface/specs-go"
...
...
internal/info/auto.go
View file @
48c080c4
...
@@ -5,8 +5,8 @@
...
@@ -5,8 +5,8 @@
package
info
package
info
import
(
import
(
"d
tk
-container-toolkit/internal/config/image"
"d
cu
-container-toolkit/internal/config/image"
"d
tk
-container-toolkit/internal/logger"
"d
cu
-container-toolkit/internal/logger"
)
)
// ResolveAutoMode determines the correct mode for the platform if set to "auto"
// ResolveAutoMode determines the correct mode for the platform if set to "auto"
...
...
Prev
1
2
3
4
5
6
7
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment