Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 81347ab8a0 | |||
| 6bb0097829 | |||
| 1cea6fbd2d | |||
| 40db98915f | |||
| 94926b74b6 | |||
| d0347b0755 | |||
| 9bc9ba11c5 | |||
| 48fdc65e3d |
@@ -0,0 +1,37 @@
|
|||||||
|
// .devcontainer/devcontainer.json
|
||||||
|
// Dev container for the Vast.ai serverless Ollama template.
|
||||||
|
// Includes Docker-in-Docker so you can build and test images from inside the container.
|
||||||
|
{
|
||||||
|
"name": "vast.ai-serverless-ollama",
|
||||||
|
"image": "mcr.microsoft.com/devcontainers/base:trixie",
|
||||||
|
"features": {
|
||||||
|
"ghcr.io/devcontainers/features/python:1": {
|
||||||
|
"installTools": true,
|
||||||
|
"version": "3.12"
|
||||||
|
},
|
||||||
|
"ghcr.io/devcontainers/features/docker-in-docker:3.0.0": {
|
||||||
|
"moby": false,
|
||||||
|
"version": "latest",
|
||||||
|
"installDockerBuildx": true,
|
||||||
|
"dockerDashComposeVersion": "v2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"runArgs": ["--privileged"],
|
||||||
|
"containerEnv": {
|
||||||
|
"DOCKER_BUILDKIT": "1"
|
||||||
|
},
|
||||||
|
"postCreateCommand": "python3 -m pip install --user --upgrade pip && python3 -m pip install --user -r requirements.txt pyyaml",
|
||||||
|
"customizations": {
|
||||||
|
"vscode": {
|
||||||
|
"extensions": [
|
||||||
|
"ms-python.python",
|
||||||
|
"ms-azuretools.vscode-docker"
|
||||||
|
],
|
||||||
|
"settings": {
|
||||||
|
"python.defaultInterpreterPath": "/usr/bin/python3",
|
||||||
|
"terminal.integrated.defaultProfile.linux": "bash",
|
||||||
|
"docker.showStartPage": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,25 +4,20 @@ import os
|
|||||||
|
|
||||||
from vastai import Worker, WorkerConfig, HandlerConfig, LogActionConfig, BenchmarkConfig
|
from vastai import Worker, WorkerConfig, HandlerConfig, LogActionConfig, BenchmarkConfig
|
||||||
|
|
||||||
# vLLM model configuration
|
# Ollama model configuration
|
||||||
MODEL_SERVER_URL = 'http://127.0.0.1'
|
MODEL_SERVER_URL = 'http://127.0.0.1:11434'
|
||||||
MODEL_SERVER_PORT = 18000
|
MODEL_SERVER_PORT = 11434
|
||||||
MODEL_LOG_FILE = '/var/log/portal/vllm.log'
|
MODEL_LOG_FILE = '/var/log/onstart.log'
|
||||||
MODEL_HEALTHCHECK_ENDPOINT = "/health"
|
MODEL_HEALTHCHECK_ENDPOINT = "/"
|
||||||
|
|
||||||
# vLLM-specific log messages
|
# Ollama-specific log messages
|
||||||
MODEL_LOAD_LOG_MSG = [
|
MODEL_LOAD_LOG_MSG = [
|
||||||
"Application startup complete.",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
MODEL_ERROR_LOG_MSGS = [
|
MODEL_ERROR_LOG_MSGS = [
|
||||||
"INFO exited: vllm",
|
|
||||||
"RuntimeError: Engine",
|
|
||||||
"Traceback (most recent call last):"
|
|
||||||
]
|
]
|
||||||
|
|
||||||
MODEL_INFO_LOG_MSGS = [
|
MODEL_INFO_LOG_MSGS = [
|
||||||
'"message":"Download'
|
|
||||||
]
|
]
|
||||||
|
|
||||||
nltk.download("words")
|
nltk.download("words")
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ def benchmark_generator() -> dict:
|
|||||||
benchmark_data = {
|
benchmark_data = {
|
||||||
"inputs": prompt,
|
"inputs": prompt,
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"max_new_tokens": 128,
|
"max_new_tokens": 500,
|
||||||
"temperature": 0.7,
|
"temperature": 0.7,
|
||||||
"return_full_text": False
|
"return_full_text": False
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user