Add package data for GPU rent and update CLI documentation
- Added package data configuration for the 'gpu_rent' package in pyproject.toml. - Updated README.md to include usage instructions for Windows and Unix launchers. - Enhanced CLI documentation in cli.md to reflect new commands and their functionalities. - Revised setup.md to clarify installation steps and environment setup. - Improved error handling and command descriptions in the CLI implementation. - Added new functions for model version handling and flavor resolution in the codebase. - Updated state management to include additional properties for better tracking.
This commit is contained in:
@@ -9,8 +9,20 @@ from gpu_rent.config import Config
|
||||
from gpu_rent.errors import CloudError
|
||||
|
||||
RESOURCE_TAG = "gpu-rent"
|
||||
PREEMPTIBLE_TAG = "preemptible"
|
||||
COMPUTE_MICROVERSION = "2.72"
|
||||
|
||||
SERVER_NAME = "gpu-rent"
|
||||
KEYPAIR_NAME = "gpu-rent"
|
||||
NET_NAME = "gpu-rent"
|
||||
SUBNET_NAME = "gpu-rent-subnet"
|
||||
ROUTER_NAME = "gpu-rent"
|
||||
SG_NAME = "gpu-rent"
|
||||
BOOT_VOLUME_NAME = "gpu-rent-boot"
|
||||
DATA_VOLUME_NAME = "gpu-rent-data"
|
||||
SUBNET_CIDR = "192.168.77.0/24"
|
||||
BOOT_VOLUME_SIZE_GB = 40
|
||||
|
||||
|
||||
def connect(cfg: Config):
|
||||
try:
|
||||
@@ -34,6 +46,10 @@ def connect(cfg: Config):
|
||||
app_version="0.1.0",
|
||||
)
|
||||
conn.authorize()
|
||||
try:
|
||||
conn.compute.default_microversion = COMPUTE_MICROVERSION
|
||||
except Exception:
|
||||
pass
|
||||
except Exception as exc:
|
||||
raise CloudError(
|
||||
"Keystone не выдал токен. Проверь OS_USERNAME / OS_PASSWORD / "
|
||||
|
||||
Reference in New Issue
Block a user