change MODEL_NAME to OLLAMA_MODEL_NAME to prevent runpod from blocking deploy

This commit is contained in:
SvenBrnn
2025-10-06 08:10:12 +02:00
parent 074e069cdd
commit 3920146e31
4 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -12,7 +12,7 @@
"presets": [],
"env": [
{
"key": "MODEL_NAME",
"key": "OLLAMA_MODEL_NAME",
"input": {
"name": "Model Name",
"type": "string",
+1 -1
View File
@@ -13,7 +13,7 @@
"gpuCount": 1,
"env": [
{
"key": "MODEL_NAME",
"key": "OLLAMA_MODEL_NAME",
"value": "phi3"
}
],
+3 -3
View File
@@ -2,7 +2,7 @@
## How to use
Start a runpod serverless with the docker container ``svenbrnn/runpod-ollama:latest``. Set ``MODEL_NAME`` environment to a model from ollama.com to automatically download a model.
Start a runpod serverless with the docker container ``svenbrnn/runpod-ollama:latest``. Set ``OLLAMA_MODEL_NAME`` environment to a model from ollama.com to automatically download a model.
A mounted volume will be automatically used.
[![RunPod](https://api.runpod.io/badge/SvenBrnn/runpod-worker-ollama)](https://www.runpod.io/console/hub/SvenBrnn/runpod-worker-ollama)
@@ -10,8 +10,8 @@ A mounted volume will be automatically used.
## Environment variables
| Variable Name | Description | Default Value |
|---------------|------------------------------------------|---------------------|
| `MODEL_NAME` | The name of the model to download | NULL |
|---------------------|------------------------------------------|---------------------|
| `OLLAMA_MODEL_NAME` | The name of the model to download | NULL |
## Test requests for runpod.io console
+2 -2
View File
@@ -18,8 +18,8 @@ class OllamaEngine:
print ("OllamaEngine initialized")
async def generate(self, job_input):
# Get model from MODEL_NAME defauting to llama3.2:1b
model = os.getenv("MODEL_NAME", "llama3.2:1b")
# Get model from OLLAMA_MODEL_NAME defauting to llama3.2:1b
model = os.getenv("OLLAMA_MODEL_NAME", "llama3.2:1b")
# Depending if prompt is a string or a list, we need to handle it differently and send it to the OpenAI API
if isinstance(job_input.llm_input, str):