mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-04 12:07:34 +00:00
(docs): update links from readthedocs to llamastack.github.io
This commit is contained in:
parent
8ef1189be7
commit
d915eaaced
21 changed files with 997 additions and 993 deletions
|
@ -11,11 +11,11 @@
|
|||
"\n",
|
||||
"# Getting Started with Llama 4 in Llama Stack\n",
|
||||
"\n",
|
||||
"<img src=\"https://llama-stack.readthedocs.io/en/latest/_images/llama-stack.png\" alt=\"drawing\" width=\"500\"/>\n",
|
||||
"<img src=\"https://llamastack.github.io/latest/_images/llama-stack.png\" alt=\"drawing\" width=\"500\"/>\n",
|
||||
"\n",
|
||||
"[Llama Stack](https://github.com/meta-llama/llama-stack) defines and standardizes the set of core building blocks needed to bring generative AI applications to market. These building blocks are presented in the form of interoperable APIs with a broad set of Service Providers providing their implementations.\n",
|
||||
"\n",
|
||||
"Read more about the project here: https://llama-stack.readthedocs.io/en/latest/index.html\n",
|
||||
"Read more about the project here: https://llamastack.github.io/latest/index.html\n",
|
||||
"\n",
|
||||
"In this guide, we will showcase how you can get started with using Llama 4 in Llama Stack.\n",
|
||||
"\n",
|
||||
|
@ -51,7 +51,7 @@
|
|||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"!pip install uv \n",
|
||||
"!pip install uv\n",
|
||||
"\n",
|
||||
"MODEL=\"Llama-4-Scout-17B-16E-Instruct\"\n",
|
||||
"# get meta url from llama.com\n",
|
||||
|
@ -223,7 +223,7 @@
|
|||
}
|
||||
],
|
||||
"source": [
|
||||
"import os \n",
|
||||
"import os\n",
|
||||
"import subprocess\n",
|
||||
"import time\n",
|
||||
"\n",
|
||||
|
@ -232,8 +232,8 @@
|
|||
"if \"UV_SYSTEM_PYTHON\" in os.environ:\n",
|
||||
" del os.environ[\"UV_SYSTEM_PYTHON\"]\n",
|
||||
"\n",
|
||||
"# this command installs all the dependencies needed for the llama stack server \n",
|
||||
"!uv run --with llama-stack llama stack build --distro meta-reference-gpu --image-type venv \n",
|
||||
"# this command installs all the dependencies needed for the llama stack server\n",
|
||||
"!uv run --with llama-stack llama stack build --distro meta-reference-gpu --image-type venv\n",
|
||||
"\n",
|
||||
"def run_llama_stack_server_background():\n",
|
||||
" log_file = open(\"llama_stack_server.log\", \"w\")\n",
|
||||
|
@ -244,7 +244,7 @@
|
|||
" stderr=log_file,\n",
|
||||
" text=True\n",
|
||||
" )\n",
|
||||
" \n",
|
||||
"\n",
|
||||
" print(f\"Starting Llama Stack server with PID: {process.pid}\")\n",
|
||||
" return process\n",
|
||||
"\n",
|
||||
|
@ -252,11 +252,11 @@
|
|||
" import requests\n",
|
||||
" from requests.exceptions import ConnectionError\n",
|
||||
" import time\n",
|
||||
" \n",
|
||||
"\n",
|
||||
" url = \"http://0.0.0.0:8321/v1/health\"\n",
|
||||
" max_retries = 30\n",
|
||||
" retry_interval = 1\n",
|
||||
" \n",
|
||||
"\n",
|
||||
" print(\"Waiting for server to start\", end=\"\")\n",
|
||||
" for _ in range(max_retries):\n",
|
||||
" try:\n",
|
||||
|
@ -267,12 +267,12 @@
|
|||
" except ConnectionError:\n",
|
||||
" print(\".\", end=\"\", flush=True)\n",
|
||||
" time.sleep(retry_interval)\n",
|
||||
" \n",
|
||||
"\n",
|
||||
" print(\"\\nServer failed to start after\", max_retries * retry_interval, \"seconds\")\n",
|
||||
" return False\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"# use this helper if needed to kill the server \n",
|
||||
"# use this helper if needed to kill the server\n",
|
||||
"def kill_llama_stack_server():\n",
|
||||
" # Kill any existing llama stack server processes\n",
|
||||
" os.system(\"ps aux | grep -v grep | grep llama_stack.core.server.server | awk '{print $2}' | xargs kill -9\")\n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue