change MODEL_NAME to OLLAMA_MODEL_NAME to prevent runpod from blocking deploy
This commit is contained in:
+1
-1
@@ -12,7 +12,7 @@
|
||||
"presets": [],
|
||||
"env": [
|
||||
{
|
||||
"key": "MODEL_NAME",
|
||||
"key": "OLLAMA_MODEL_NAME",
|
||||
"input": {
|
||||
"name": "Model Name",
|
||||
"type": "string",
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
"gpuCount": 1,
|
||||
"env": [
|
||||
{
|
||||
"key": "MODEL_NAME",
|
||||
"key": "OLLAMA_MODEL_NAME",
|
||||
"value": "phi3"
|
||||
}
|
||||
],
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
|
||||
## 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.
|
||||
|
||||
[](https://www.runpod.io/console/hub/SvenBrnn/runpod-worker-ollama)
|
||||
|
||||
## Environment variables
|
||||
|
||||
| Variable Name | Description | Default Value |
|
||||
|---------------|------------------------------------------|---------------------|
|
||||
| `MODEL_NAME` | The name of the model to download | NULL |
|
||||
| Variable Name | Description | Default Value |
|
||||
|---------------------|------------------------------------------|---------------------|
|
||||
| `OLLAMA_MODEL_NAME` | The name of the model to download | NULL |
|
||||
|
||||
## Test requests for runpod.io console
|
||||
|
||||
|
||||
+2
-2
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user