feat(ollama): configure environment variables for ollama service

- Updated `services.ollama` to include `environmentVariables` object
- Configured `OLLAMA_ORIGINS`, `OLLAMA_FLASH_ATTENTION`, and `OLLAMA_NUM_PARALLEL` variables
- Changed the value of `OLLAMA_NUM_PARALLEL` to "2" from "3"
This commit is contained in:
Giulio De Pasquale 2024-06-04 22:50:49 +01:00
parent f8a716f8ba
commit d76ccbe564

View File

@ -11,11 +11,6 @@ in
{ {
environment = { environment = {
systemPackages = [ ollamaPkg ]; systemPackages = [ ollamaPkg ];
variables = {
OLLAMA_ORIGINS = "*";
OLLAMA_FLASH_ATTENTION = "1";
OLLAMA_NUM_PARALLEL = "3";
};
}; };
services.ollama = { services.ollama = {
@ -24,6 +19,11 @@ in
enable = true; enable = true;
acceleration = "cuda"; acceleration = "cuda";
package = ollamaPkg; package = ollamaPkg;
environmentVariables = {
OLLAMA_ORIGINS = "*";
OLLAMA_FLASH_ATTENTION = "1";
OLLAMA_NUM_PARALLEL = "2";
};
}; };
architect.vhost.${frontendDomain} = { architect.vhost.${frontendDomain} = {