Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
2b8aa80b
Commit
2b8aa80b
authored
Mar 17, 2025
by
Meenakshi Sharma
Committed by
GitHub
Mar 17, 2025
Browse files
Add files via upload
parent
ca27f380
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
77 additions
and
0 deletions
+77
-0
quick-start.ipynb
quick-start.ipynb
+77
-0
No files found.
quick-start.ipynb
0 → 100644
View file @
2b8aa80b
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "4ac805ba-ce88-423f-bf3a-d8b2e0ef3a71",
"metadata": {},
"outputs": [],
"source": [
"# Quick Start Guide for Dynamo in Jupyter Notebook\n",
"\n",
"# ## Installation\n",
"\n",
"# The following steps will install necessary system packages, \n",
"# set up a virtual environment using `uv`, and install the `abc` package.\n",
"\n",
"import os\n",
"\n",
"# Install system-level dependencies\n",
"print(\"Updating package lists and installing required system packages...\")\n",
"os.system(\"apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -yq python3-dev curl libucx0\")\n",
"\n",
"# Install uv package manager\n",
"print(\"Installing uv package manager...\")\n",
"os.system(\"curl -LsSf https://astral.sh/uv/install.sh | sh\")\n",
"os.system(\"source $HOME/.local/bin/env\")\n",
"\n",
"# Create and activate a virtual environment for ABC\n",
"print(\"Setting up virtual environment...\")\n",
"os.system(\"uv venv dynamo-venv\")\n",
"os.system(\"source dynamo-venv/bin/activate\")\n",
"\n",
"# Install the Dynamo package with all dependencies\n",
"print(\"Installing Dynamo package...\")\n",
"os.system(\"uv pip install ai-dynamo[all]\")\n",
"\n",
"# ## Running and Interacting with an LLM Locally\n",
"\n",
"# To run a model and interact with it locally, we use `dynamo run` with a Hugging Face model.\n",
"# Dynamo supports several backends, including: mistralrs, sglang, vllm, and tensorrtllm.\n",
"\n",
"# Example command to run a model\n",
"model_name = \"deepseek-ai/DeepSeek-R1-Distill-Llama-8B\"\n",
"backend = \"vllm\"\n",
"command = f\"dynamo run out={backend} {model_name}\"\n",
"\n",
"print(f\"Running the model with: {command}\")\n",
"os.system(command)\n",
"\n",
"# Once launched, you'll be able to chat directly with the model from the command line.\n",
"\n",
"\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.12"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment