Home
Docker Model Runner
登录后可跨设备保存划线和私人笔记登录
Docker Model Runner
This module helps connect to Docker Model Runner provided by Docker Desktop 4.40.0.
DockerModelRunner's usage examples
You can start a Docker Model Runner proxy container instance from any Java application by using:
Create a DockerModelRunnerContainer
DockerModelRunnerContainer dmr = new DockerModelRunnerContainer("alpine/socat:1.7.4.3-r0")Pulling the model
Pulling the model is as simple as:
Pull model
DockerModelRunnerContainer dmr = new DockerModelRunnerContainer("alpine/socat:1.7.4.3-r0")
.withModel(modelName)Adding this module to your project dependencies
Docker Model Runner support is part of the core Testcontainers library.
Add the following dependency to your pom.xml/build.gradle file:
GradleMaven
testImplementation "org.testcontainers:testcontainers:2.0.5"<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>2.0.5</version>
<scope>test</scope>
</dependency>评论
登录后参与评论
正在加载评论…
KnowForge