Skip to content

Commit 6bf1f5b

Browse files
committed
Merge branch 'main' into development
1 parent 90c8a76 commit 6bf1f5b

File tree

2 files changed

+41
-4
lines changed

2 files changed

+41
-4
lines changed

build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id "java"
2+
id "java-library"
33
id "com.github.johnrengelman.shadow" version "8.1.1"
44
id "io.github.intisy.online-gradle" version "1.7.2"
55
}
@@ -19,9 +19,9 @@ repositories {
1919
}
2020

2121
dependencies {
22-
implementation "com.google.code.gson:gson:2.10.1"
23-
implementation "org.apache.commons:commons-compress:1.24.0"
24-
implementation "com.kohlschutter.junixsocket:junixsocket-core:2.9.0"
22+
api "com.google.code.gson:gson:2.10.1"
23+
api "org.apache.commons:commons-compress:1.24.0"
24+
api "com.kohlschutter.junixsocket:junixsocket-core:2.9.0"
2525
implementation "org.slf4j:slf4j-simple:2.0.7"
2626
testImplementation "org.junit.jupiter:junit-jupiter:5.10.1"
2727
}

src/main/java/io/github/intisy/docker/DockerProvider.java

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,4 +136,41 @@ public static DockerProvider get() {
136136
* Downloads and installs Docker if necessary.
137137
*/
138138
public abstract void ensureInstalled() throws IOException;
139+
140+
/**
141+
* Check if NVIDIA GPU is available on this system.
142+
* @return true if an NVIDIA GPU is detected, false otherwise
143+
*/
144+
public boolean isNvidiaGpuAvailable() {
145+
return false;
146+
}
147+
148+
/**
149+
* Check if NVIDIA Container Toolkit is installed.
150+
* The toolkit is required to pass GPUs to Docker containers.
151+
* @return true if installed, false otherwise
152+
*/
153+
public boolean isNvidiaContainerToolkitInstalled() {
154+
return false;
155+
}
156+
157+
/**
158+
* Ensure NVIDIA Container Toolkit is installed if an NVIDIA GPU is available.
159+
* This method will automatically install the toolkit if:
160+
* - An NVIDIA GPU is detected
161+
* - The toolkit is not already installed
162+
*
163+
* @throws IOException if installation fails
164+
*/
165+
public void ensureNvidiaContainerToolkit() throws IOException {}
166+
167+
/**
168+
* Install NVIDIA Container Toolkit.
169+
* This enables GPU passthrough to Docker containers.
170+
*
171+
* @throws IOException if installation fails
172+
*/
173+
public void installNvidiaContainerToolkit() throws IOException {
174+
throw new UnsupportedOperationException("NVIDIA Container Toolkit installation not supported on this platform");
175+
}
139176
}

0 commit comments

Comments
 (0)