golem-vm-provider 0.1.10__tar.gz → 0.1.12__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {golem_vm_provider-0.1.10 → golem_vm_provider-0.1.12}/PKG-INFO +1 -1
- {golem_vm_provider-0.1.10 → golem_vm_provider-0.1.12}/provider/config.py +72 -14
- {golem_vm_provider-0.1.10 → golem_vm_provider-0.1.12}/pyproject.toml +1 -1
- {golem_vm_provider-0.1.10 → golem_vm_provider-0.1.12}/README.md +0 -0
- {golem_vm_provider-0.1.10 → golem_vm_provider-0.1.12}/provider/__init__.py +0 -0
- {golem_vm_provider-0.1.10 → golem_vm_provider-0.1.12}/provider/api/__init__.py +0 -0
- {golem_vm_provider-0.1.10 → golem_vm_provider-0.1.12}/provider/api/models.py +0 -0
- {golem_vm_provider-0.1.10 → golem_vm_provider-0.1.12}/provider/api/routes.py +0 -0
- {golem_vm_provider-0.1.10 → golem_vm_provider-0.1.12}/provider/discovery/__init__.py +0 -0
- {golem_vm_provider-0.1.10 → golem_vm_provider-0.1.12}/provider/discovery/advertiser.py +0 -0
- {golem_vm_provider-0.1.10 → golem_vm_provider-0.1.12}/provider/discovery/resource_tracker.py +0 -0
- {golem_vm_provider-0.1.10 → golem_vm_provider-0.1.12}/provider/main.py +0 -0
- {golem_vm_provider-0.1.10 → golem_vm_provider-0.1.12}/provider/network/port_verifier.py +0 -0
- {golem_vm_provider-0.1.10 → golem_vm_provider-0.1.12}/provider/security/ethereum.py +0 -0
- {golem_vm_provider-0.1.10 → golem_vm_provider-0.1.12}/provider/utils/ascii_art.py +0 -0
- {golem_vm_provider-0.1.10 → golem_vm_provider-0.1.12}/provider/utils/logging.py +0 -0
- {golem_vm_provider-0.1.10 → golem_vm_provider-0.1.12}/provider/utils/port_display.py +0 -0
- {golem_vm_provider-0.1.10 → golem_vm_provider-0.1.12}/provider/utils/retry.py +0 -0
- {golem_vm_provider-0.1.10 → golem_vm_provider-0.1.12}/provider/vm/__init__.py +0 -0
- {golem_vm_provider-0.1.10 → golem_vm_provider-0.1.12}/provider/vm/cloud_init.py +0 -0
- {golem_vm_provider-0.1.10 → golem_vm_provider-0.1.12}/provider/vm/models.py +0 -0
- {golem_vm_provider-0.1.10 → golem_vm_provider-0.1.12}/provider/vm/multipass.py +0 -0
- {golem_vm_provider-0.1.10 → golem_vm_provider-0.1.12}/provider/vm/name_mapper.py +0 -0
- {golem_vm_provider-0.1.10 → golem_vm_provider-0.1.12}/provider/vm/port_manager.py +0 -0
- {golem_vm_provider-0.1.10 → golem_vm_provider-0.1.12}/provider/vm/proxy_manager.py +0 -0
@@ -96,25 +96,83 @@ class Settings(BaseSettings):
|
|
96
96
|
if v:
|
97
97
|
path = v
|
98
98
|
else:
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
99
|
+
import platform
|
100
|
+
import subprocess
|
101
|
+
|
102
|
+
system = platform.system().lower()
|
103
|
+
binary_name = "multipass.exe" if system == "windows" else "multipass"
|
104
|
+
|
105
|
+
# Try to find multipass based on OS
|
106
|
+
if system == "linux":
|
107
|
+
# First try to find snap
|
108
|
+
try:
|
109
|
+
snap_result = subprocess.run(
|
110
|
+
["which", "snap"],
|
111
|
+
capture_output=True,
|
112
|
+
text=True
|
113
|
+
)
|
114
|
+
if snap_result.returncode == 0:
|
115
|
+
# If snap exists, check if multipass is installed
|
116
|
+
snap_path = "/snap/bin/multipass"
|
117
|
+
if os.path.isfile(snap_path) and os.access(snap_path, os.X_OK):
|
118
|
+
return snap_path
|
119
|
+
except subprocess.SubprocessError:
|
120
|
+
pass
|
121
|
+
|
122
|
+
# Common Linux paths
|
123
|
+
search_paths = [
|
124
|
+
"/usr/local/bin",
|
125
|
+
"/usr/bin",
|
126
|
+
"/snap/bin"
|
127
|
+
]
|
128
|
+
|
129
|
+
elif system == "darwin": # macOS
|
130
|
+
search_paths = [
|
131
|
+
"/opt/homebrew/bin", # M1 Mac
|
132
|
+
"/usr/local/bin", # Intel Mac
|
133
|
+
"/opt/local/bin" # MacPorts
|
134
|
+
]
|
135
|
+
|
136
|
+
elif system == "windows":
|
137
|
+
search_paths = [
|
138
|
+
os.path.expandvars(r"%ProgramFiles%\Multipass"),
|
139
|
+
os.path.expandvars(r"%ProgramFiles(x86)%\Multipass"),
|
140
|
+
os.path.expandvars(r"%LocalAppData%\Multipass")
|
141
|
+
]
|
142
|
+
|
143
|
+
else:
|
144
|
+
search_paths = ["/usr/local/bin", "/usr/bin"]
|
145
|
+
|
146
|
+
# Search for multipass binary in OS-specific paths
|
109
147
|
for directory in search_paths:
|
110
148
|
path = os.path.join(directory, binary_name)
|
111
149
|
if os.path.isfile(path) and os.access(path, os.X_OK):
|
112
150
|
return path
|
113
151
|
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
152
|
+
# OS-specific installation instructions
|
153
|
+
if system == "linux":
|
154
|
+
raise ValueError(
|
155
|
+
"Multipass binary not found. Please install using:\n"
|
156
|
+
"sudo snap install multipass\n"
|
157
|
+
"Or set GOLEM_PROVIDER_MULTIPASS_BINARY_PATH to your Multipass binary path."
|
158
|
+
)
|
159
|
+
elif system == "darwin":
|
160
|
+
raise ValueError(
|
161
|
+
"Multipass binary not found. Please install using:\n"
|
162
|
+
"brew install multipass\n"
|
163
|
+
"Or set GOLEM_PROVIDER_MULTIPASS_BINARY_PATH to your Multipass binary path."
|
164
|
+
)
|
165
|
+
elif system == "windows":
|
166
|
+
raise ValueError(
|
167
|
+
"Multipass binary not found. Please install from:\n"
|
168
|
+
"Microsoft Store or https://multipass.run/download/windows\n"
|
169
|
+
"Or set GOLEM_PROVIDER_MULTIPASS_BINARY_PATH to your Multipass binary path."
|
170
|
+
)
|
171
|
+
else:
|
172
|
+
raise ValueError(
|
173
|
+
"Multipass binary not found. Please install Multipass or set "
|
174
|
+
"GOLEM_PROVIDER_MULTIPASS_BINARY_PATH to your Multipass binary path."
|
175
|
+
)
|
118
176
|
|
119
177
|
# Validate the path
|
120
178
|
if not os.path.isfile(path):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "golem-vm-provider"
|
3
|
-
version = "0.1.
|
3
|
+
version = "0.1.12"
|
4
4
|
description = "VM on Golem Provider Node - Run your own provider node to offer VMs on the Golem Network"
|
5
5
|
authors = ["Phillip Jensen <phillip+vm-on-golem@golemgrid.com>"]
|
6
6
|
readme = "README.md"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{golem_vm_provider-0.1.10 → golem_vm_provider-0.1.12}/provider/discovery/resource_tracker.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|