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
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
68 additions
and
68 deletions
+68
-68
internal/modifier/sysfs.go
internal/modifier/sysfs.go
+4
-4
internal/oci/runtime_low_level.go
internal/oci/runtime_low_level.go
+2
-2
internal/oci/runtime_modifier.go
internal/oci/runtime_modifier.go
+1
-1
internal/oci/runtime_path.go
internal/oci/runtime_path.go
+1
-1
internal/oci/spec.go
internal/oci/spec.go
+1
-1
internal/platform-support/dhcu/c3000smi.go
internal/platform-support/dhcu/c3000smi.go
+4
-4
internal/platform-support/dhcu/dhcu.go
internal/platform-support/dhcu/dhcu.go
+3
-3
internal/platform-support/dhcu/options.go
internal/platform-support/dhcu/options.go
+2
-2
internal/runtime/logger.go
internal/runtime/logger.go
+1
-1
internal/runtime/runtime.go
internal/runtime/runtime.go
+4
-4
internal/runtime/runtime_factory.go
internal/runtime/runtime_factory.go
+7
-7
packaging/debian/control
packaging/debian/control
+2
-2
packaging/debian/dcu-container-toolkit.install
packaging/debian/dcu-container-toolkit.install
+3
-0
packaging/debian/dcu-container-toolkit.postinst
packaging/debian/dcu-container-toolkit.postinst
+3
-3
packaging/debian/dcu-container-toolkit.postrm
packaging/debian/dcu-container-toolkit.postrm
+0
-0
packaging/debian/dtk-container-toolkit.install
packaging/debian/dtk-container-toolkit.install
+0
-3
packaging/rpm/SPECS/dcu-container-toolkit.spec
packaging/rpm/SPECS/dcu-container-toolkit.spec
+16
-16
pkg/c3000cdi/api.go
pkg/c3000cdi/api.go
+2
-2
pkg/c3000cdi/lib-c3000smi.go
pkg/c3000cdi/lib-c3000smi.go
+6
-6
pkg/c3000cdi/lib.go
pkg/c3000cdi/lib.go
+6
-6
No files found.
internal/modifier/sysfs.go
View file @
48c080c4
...
...
@@ -6,9 +6,9 @@ package modifier
import
(
"bufio"
"d
tk
-container-toolkit/internal/config/image"
"d
tk
-container-toolkit/internal/logger"
"d
tk
-container-toolkit/internal/oci"
"d
cu
-container-toolkit/internal/config/image"
"d
cu
-container-toolkit/internal/logger"
"d
cu
-container-toolkit/internal/oci"
"errors"
"fmt"
"os"
...
...
@@ -158,7 +158,7 @@ func (m sysfsMountModifier) Modify(spec *specs.Spec) error {
if
len
(
links
)
!=
0
{
var
args
[]
string
args
=
append
(
args
,
"d
tk
-ctk"
,
"hook"
,
"create-symlinks"
)
args
=
append
(
args
,
"d
cu
-ctk"
,
"hook"
,
"create-symlinks"
)
for
_
,
l
:=
range
links
{
args
=
append
(
args
,
"--link"
,
l
)
}
...
...
internal/oci/runtime_low_level.go
View file @
48c080c4
...
...
@@ -5,8 +5,8 @@
package
oci
import
(
"d
tk
-container-toolkit/internal/logger"
"d
tk
-container-toolkit/internal/lookup"
"d
cu
-container-toolkit/internal/logger"
"d
cu
-container-toolkit/internal/lookup"
"fmt"
)
...
...
internal/oci/runtime_modifier.go
View file @
48c080c4
...
...
@@ -5,7 +5,7 @@
package
oci
import
(
"d
tk
-container-toolkit/internal/logger"
"d
cu
-container-toolkit/internal/logger"
"fmt"
)
...
...
internal/oci/runtime_path.go
View file @
48c080c4
...
...
@@ -5,7 +5,7 @@
package
oci
import
(
"d
tk
-container-toolkit/internal/logger"
"d
cu
-container-toolkit/internal/logger"
"fmt"
"os"
)
...
...
internal/oci/spec.go
View file @
48c080c4
...
...
@@ -5,7 +5,7 @@
package
oci
import
(
"d
tk
-container-toolkit/internal/logger"
"d
cu
-container-toolkit/internal/logger"
"fmt"
"github.com/opencontainers/runtime-spec/specs-go"
)
...
...
internal/platform-support/dhcu/c3000smi.go
View file @
48c080c4
...
...
@@ -5,10 +5,10 @@
package
dhcu
import
(
"d
tk
-container-toolkit/internal/discover"
"d
tk
-container-toolkit/internal/info/drm"
"d
tk
-container-toolkit/internal/lookup"
"d
tk
-container-toolkit/pkg/go-c3000lib/pkg/device"
"d
cu
-container-toolkit/internal/discover"
"d
cu
-container-toolkit/internal/info/drm"
"d
cu
-container-toolkit/internal/lookup"
"d
cu
-container-toolkit/pkg/go-c3000lib/pkg/device"
"fmt"
)
...
...
internal/platform-support/dhcu/dhcu.go
View file @
48c080c4
...
...
@@ -5,9 +5,9 @@
package
dhcu
import
(
"d
tk
-container-toolkit/internal/discover"
"d
tk
-container-toolkit/internal/logger"
"d
tk
-container-toolkit/pkg/go-c3000lib/pkg/device"
"d
cu
-container-toolkit/internal/discover"
"d
cu
-container-toolkit/internal/logger"
"d
cu
-container-toolkit/pkg/go-c3000lib/pkg/device"
"errors"
)
...
...
internal/platform-support/dhcu/options.go
View file @
48c080c4
...
...
@@ -5,8 +5,8 @@
package
dhcu
import
(
"d
tk
-container-toolkit/internal/c3000caps"
"d
tk
-container-toolkit/internal/logger"
"d
cu
-container-toolkit/internal/c3000caps"
"d
cu
-container-toolkit/internal/logger"
)
type
options
struct
{
...
...
internal/runtime/logger.go
View file @
48c080c4
...
...
@@ -5,7 +5,7 @@
package
runtime
import
(
"d
tk
-container-toolkit/internal/logger"
"d
cu
-container-toolkit/internal/logger"
"errors"
"fmt"
"io"
...
...
internal/runtime/runtime.go
View file @
48c080c4
...
...
@@ -5,9 +5,9 @@
package
runtime
import
(
"d
tk
-container-toolkit/internal/config"
"d
tk
-container-toolkit/internal/info"
"d
tk
-container-toolkit/internal/lookup/root"
"d
cu
-container-toolkit/internal/config"
"d
cu
-container-toolkit/internal/info"
"d
cu
-container-toolkit/internal/lookup/root"
"encoding/json"
"errors"
"fmt"
...
...
@@ -48,7 +48,7 @@ func (r rt) Run(argv []string) (rerr error) {
}
}()
//nolint:staticcheck // TODO(elezar): We should switch the d
tk
-container-runtime from using d
tk
-ctk to using d
tk
-cdi-hook.
//nolint:staticcheck // TODO(elezar): We should switch the d
cu
-container-runtime from using d
cu
-ctk to using d
cu
-cdi-hook.
cfg
.
DTKCTKConfig
.
Path
=
config
.
ResolveDTKCDIHookPath
(
r
.
logger
,
cfg
.
DTKCTKConfig
.
Path
)
// Print the config to the output.
...
...
internal/runtime/runtime_factory.go
View file @
48c080c4
...
...
@@ -5,13 +5,13 @@
package
runtime
import
(
"d
tk
-container-toolkit/internal/config"
"d
tk
-container-toolkit/internal/config/image"
"d
tk
-container-toolkit/internal/info"
"d
tk
-container-toolkit/internal/logger"
"d
tk
-container-toolkit/internal/lookup/root"
"d
tk
-container-toolkit/internal/modifier"
"d
tk
-container-toolkit/internal/oci"
"d
cu
-container-toolkit/internal/config"
"d
cu
-container-toolkit/internal/config/image"
"d
cu
-container-toolkit/internal/info"
"d
cu
-container-toolkit/internal/logger"
"d
cu
-container-toolkit/internal/lookup/root"
"d
cu
-container-toolkit/internal/modifier"
"d
cu
-container-toolkit/internal/oci"
"fmt"
)
...
...
packaging/debian/control
View file @
48c080c4
Source: d
tk
-container-toolkit
Source: d
cu
-container-toolkit
Section: @SECTION@utils
Priority: optional
Maintainer: DTK HCU Opt Devops
Standards-Version: 1.1.0
Build-Depends: debhelper (>= 9)
Package: d
tk
-container-toolkit
Package: d
cu
-container-toolkit
Architecture: any
Description: DTK Container toolkit
Provides tools and utilities to enable HCU support in containers.
\ No newline at end of file
packaging/debian/dcu-container-toolkit.install
0 → 100644
View file @
48c080c4
dcu
-
container
-
runtime
/
usr
/
bin
dcu
-
ctk
/
usr
/
bin
dcu
-
cdi
-
hook
/
usr
/
bin
packaging/debian/d
tk
-container-toolkit.postinst
→
packaging/debian/d
cu
-container-toolkit.postinst
View file @
48c080c4
...
...
@@ -6,12 +6,12 @@ NVIDIA_CONTAINER_RUNTIME_HOOK=/usr/bin/nvidia-container-runtime-hook
case
"
$1
"
in
configure
)
/usr/bin/d
tk
-ctk
--quiet
config
--config-file
=
/etc/d
tk
-container-runtime/config.toml
--in-place
/usr/bin/d
cu
-ctk
--quiet
config
--config-file
=
/etc/d
cu
-container-runtime/config.toml
--in-place
if
[
!
-e
"
${
NVIDIA_CONTAINER_RUNTIME_HOOK
}
"
]
;
then
ln
-s
/usr/bin/d
tk
-ctk
$NVIDIA_CONTAINER_RUNTIME_HOOK
ln
-s
/usr/bin/d
cu
-ctk
$NVIDIA_CONTAINER_RUNTIME_HOOK
fi
/usr/bin/d
tk
-ctk runtime configure
--runtime
=
docker
--set-as-default
/usr/bin/d
cu
-ctk runtime configure
--runtime
=
docker
--set-as-default
echo
-e
"
\e
[032m ==================================
\e
[0m"
echo
-e
"
\e
[033m Please restart Docker service:
\e
[0m"
echo
-e
"
\e
[033m sudo systemctl restart docker
\e
[0m"
...
...
packaging/debian/d
tk
-container-toolkit.postrm
→
packaging/debian/d
cu
-container-toolkit.postrm
View file @
48c080c4
File moved
packaging/debian/dtk-container-toolkit.install
deleted
100644 → 0
View file @
0ccfece1
dtk
-
container
-
runtime
/
usr
/
bin
dtk
-
ctk
/
usr
/
bin
dtk
-
cdi
-
hook
/
usr
/
bin
packaging/rpm/SPECS/d
tk
-container-toolkit.spec
→
packaging/rpm/SPECS/d
cu
-container-toolkit.spec
View file @
48c080c4
Name: d
tk
-container-toolkit
Name: d
cu
-container-toolkit
Version: %{version}
Release: %{release}
Group: Development Tools
...
...
@@ -9,11 +9,11 @@ Packager: HCUOpt CORPORATION
Summary: DTK Container Toolkit
License: Apache-2.0
Source0: d
tk
-ctk
Source1: d
tk
-container-runtime
Source2: d
tk
-cdi-hook
Source0: d
cu
-ctk
Source1: d
cu
-container-runtime
Source2: d
cu
-cdi-hook
Source3: LICENSE
Source4: d
tk
-docker
Source4: d
cu
-docker
%description
Provides tools and utilities to enable HCU support in containers.
...
...
@@ -23,21 +23,21 @@ cp %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} .
%install
mkdir -p %{buildroot}%{_bindir}
install -m 755 -t %{buildroot}%{_bindir} d
tk
-container-runtime
install -m 755 -t %{buildroot}%{_bindir} d
tk
-ctk
install -m 755 -t %{buildroot}%{_bindir} d
tk
-cdi-hook
install -m 755 -t %{buildroot}%{_bindir} d
tk
-docker
install -m 755 -t %{buildroot}%{_bindir} d
cu
-container-runtime
install -m 755 -t %{buildroot}%{_bindir} d
cu
-ctk
install -m 755 -t %{buildroot}%{_bindir} d
cu
-cdi-hook
install -m 755 -t %{buildroot}%{_bindir} d
cu
-docker
%posttrans
if [ ! -e %{_bindir}/nvidia-container-runtime-hook ]; then
# repairing lost file nvidia-container-runtime-hook
ln -sf %{_bindir}/d
tk
-container-runtime %{_bindir}/nvidia-container-runtime-hook
ln -sf %{_bindir}/d
cu
-container-runtime %{_bindir}/nvidia-container-runtime-hook
fi
# Generate the default config; If this file already exists no changes are made.
%{_bindir}/d
tk
-ctk --quiet config --config-file=%{_sysconfdir}/d
tk
-container-runtime/config.toml --in-place
%{_bindir}/d
cu
-ctk --quiet config --config-file=%{_sysconfdir}/d
cu
-container-runtime/config.toml --in-place
%{_bindir}/d
tk
-ctk runtime configure --runtime=docker --set-as-default
%{_bindir}/d
cu
-ctk runtime configure --runtime=docker --set-as-default
echo -e "\e[032m ================================== \e[0m"
echo -e "\e[033m Please restart Docker service: \e[0m"
echo -e "\e[033m sudo systemctl restart docker \e[0m"
...
...
@@ -51,10 +51,10 @@ fi
%files
%license LICENSE
%{_bindir}/d
tk
-ctk
%{_bindir}/d
tk
-container-runtime
%{_bindir}/d
tk
-cdi-hook
%{_bindir}/d
tk
-docker
%{_bindir}/d
cu
-ctk
%{_bindir}/d
cu
-container-runtime
%{_bindir}/d
cu
-cdi-hook
%{_bindir}/d
cu
-docker
%changelog
* %{release_date} HCUOpt CORPORATION %{version}-%{release}
- initialize version
pkg/c3000cdi/api.go
View file @
48c080c4
...
...
@@ -5,8 +5,8 @@
package
c3000cdi
import
(
"d
tk
-container-toolkit/pkg/c3000cdi/spec"
"d
tk
-container-toolkit/pkg/go-c3000lib/pkg/device"
"d
cu
-container-toolkit/pkg/c3000cdi/spec"
"d
cu
-container-toolkit/pkg/go-c3000lib/pkg/device"
"tags.cncf.io/container-device-interface/pkg/cdi"
"tags.cncf.io/container-device-interface/specs-go"
...
...
pkg/c3000cdi/lib-c3000smi.go
View file @
48c080c4
...
...
@@ -5,12 +5,12 @@
package
c3000cdi
import
(
"d
tk
-container-toolkit/internal/discover"
"d
tk
-container-toolkit/internal/edits"
"d
tk
-container-toolkit/internal/platform-support/dhcu"
"d
tk
-container-toolkit/internal/config/image"
"d
tk
-container-toolkit/pkg/c3000cdi/spec"
"d
tk
-container-toolkit/pkg/go-c3000lib/pkg/device"
"d
cu
-container-toolkit/internal/discover"
"d
cu
-container-toolkit/internal/edits"
"d
cu
-container-toolkit/internal/platform-support/dhcu"
"d
cu
-container-toolkit/internal/config/image"
"d
cu
-container-toolkit/pkg/c3000cdi/spec"
"d
cu
-container-toolkit/pkg/go-c3000lib/pkg/device"
"fmt"
"tags.cncf.io/container-device-interface/pkg/cdi"
...
...
pkg/c3000cdi/lib.go
View file @
48c080c4
...
...
@@ -5,11 +5,11 @@
package
c3000cdi
import
(
"d
tk
-container-toolkit/internal/logger"
"d
tk
-container-toolkit/internal/lookup/root"
"d
tk
-container-toolkit/pkg/c3000cdi/transform"
"d
tk
-container-toolkit/pkg/go-c3000lib/pkg/device"
"d
tk
-container-toolkit/pkg/go-c3000smi/pkg/c3000smi"
"d
cu
-container-toolkit/internal/logger"
"d
cu
-container-toolkit/internal/lookup/root"
"d
cu
-container-toolkit/pkg/c3000cdi/transform"
"d
cu
-container-toolkit/pkg/go-c3000lib/pkg/device"
"d
cu
-container-toolkit/pkg/go-c3000smi/pkg/c3000smi"
"fmt"
)
...
...
@@ -51,7 +51,7 @@ func New(opts ...Option) (Interface, error) {
l
.
deviceNamers
=
[]
DeviceNamer
{
indexNamer
}
}
if
l
.
dtkCDIHookPath
==
""
{
l
.
dtkCDIHookPath
=
"/usr/bin/d
tk
-cdi-hook"
l
.
dtkCDIHookPath
=
"/usr/bin/d
cu
-cdi-hook"
}
if
l
.
driverRoot
==
""
{
l
.
driverRoot
=
"/"
...
...
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