-
-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0f26b4a
commit 4059231
Showing
3 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Ollama | ||
|
||
Testcontainers module for [Ollama](https://hub.docker.com/r/ollama/ollama) . | ||
|
||
## Ollama usage examples | ||
|
||
You can start an Ollama container instance from any NodeJS application by using: | ||
|
||
<!--codeinclude--> | ||
[Ollama container](../../packages/modules/ollama/src/ollama-container.test.ts) inside_block:container | ||
<!--/codeinclude--> | ||
|
||
### Pulling the model | ||
|
||
<!--codeinclude--> | ||
[Pull model](../../packages/modules/ollama/src/ollama-container.test.ts) inside_block:pullModel | ||
<!--/codeinclude--> | ||
|
||
### Create a new Image | ||
|
||
In order to create a new image that contains the model, you can use the following code: | ||
|
||
<!--codeinclude--> | ||
[Commit Image](../../packages/modules/ollama/src/ollama-container.test.ts) inside_block:commitToImage | ||
<!--/codeinclude--> | ||
|
||
And use the new image: | ||
|
||
<!--codeinclude--> | ||
[Use new Image](../../packages/modules/ollama/src/ollama-container.test.ts) inside_block:substitute | ||
<!--/codeinclude--> | ||
|
||
## Adding this module to your project | ||
|
||
```bash | ||
npm install @testcontainers/ollama --save-dev | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters