A Python wrapper for the Hyperstack API
Project description
Hyperstack Python Client
This is a Python client for interacting with the Hyperstack API
Installation
pip install hyperstack
Usage
First ensure you have your API key set in an environment variable:
export HYPERSTACK_API_KEY=<your API Key>
import hyperstack
Create an environment if you don't have one
hyperstack.create_environment('your-environment-name')
Set your environment
hyperstack.set_environment('your-environment-name')
Create a VM
hyperstack.create_vm(
name='first-vm',
image_name="Ubuntu Server 22.04 LTS R535 CUDA 12.2",
flavor_name='n2-RTX-A5000x1',
key_name="your-key",
user_data="",
create_bootable_volume=False,
assign_floating_ip=False,
count=1)
Deploy Ollama Server
First set-up your ssh key and environment. Then navigate to the hyperstack library and run:
python3 hyperstack/deploy.py ollama --name ollama-server --flavor_name n2-RTX-A5000x1 --key_name your-key --environment your-environment
Deploy Pytorch server
The same command as above, but change ollama to pytorch
python3 hyperstack/deploy.py pytorch --name ollama-server --flavor_name n2-RTX-A5000x1 --key_name your-key --environment your-environment
Deploy from Python
from hyperstack.deploy import deploy
deploy(deployment_type="pytorch", name="pytorch-vm", environment="your-environment", flavor_name="n2-RTX-A5000x1", key_name="your-key")
from hyperstack.deploy import deploy
deploy(deployment_type="ollama", name="ollama-vm", environment="your-environment", flavor_name="n2-RTX-A5000x1", key_name="your-key")
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hyperstack-0.2.4.tar.gz
(13.2 kB
view details)
Built Distribution
File details
Details for the file hyperstack-0.2.4.tar.gz
.
File metadata
- Download URL: hyperstack-0.2.4.tar.gz
- Upload date:
- Size: 13.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/23.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90110ee1eb172383252fd14af5ecbde31913235b33ce6858cc63e04d3ffa89ba |
|
MD5 | f561e8b673c3647dd24eaa283289c044 |
|
BLAKE2b-256 | 264f3c16ba33b8adb4288d49b4275533d90d9fac6c69f925a6ca3822f0274829 |
File details
Details for the file hyperstack-0.2.4-py3-none-any.whl
.
File metadata
- Download URL: hyperstack-0.2.4-py3-none-any.whl
- Upload date:
- Size: 16.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/23.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e302940e068d349ba1ac4d73820a8c0b436d7f1867cc83a6b500e8f00de38bd |
|
MD5 | 029351dfe6b66a6dd1a15f255f21c360 |
|
BLAKE2b-256 | 6546df04976c482ff130fe0299077298f69b4683bd3580bbded9e86aed8141ab |