diff --git a/neurons/Miner/container.py b/neurons/Miner/container.py index d3036ddc..6289324c 100644 --- a/neurons/Miner/container.py +++ b/neurons/Miner/container.py @@ -28,7 +28,6 @@ from io import BytesIO import sys from docker.types import DeviceRequest -from compute import __version_as_int__ parent_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.append(parent_dir) @@ -178,7 +177,7 @@ def run_container(cpu_usage, ram_usage, hard_disk_usage, gpu_usage, public_key, # Check the status to determine if the container ran successfully if container.status == "created": bt.logging.info("Container was created successfully.") - info = {"username": "root", "password": password, "port": docker_ssh_port, "version" : __version_as_int__} + info = {"username": "root", "password": password, "port": docker_ssh_port} info_str = json.dumps(info) public_key = public_key.encode("utf-8") encrypted_info = rsa.encrypt_data(public_key, info_str) diff --git a/neurons/register_api.py b/neurons/register_api.py index 0a511fe8..5f6f5d9d 100644 --- a/neurons/register_api.py +++ b/neurons/register_api.py @@ -519,7 +519,7 @@ async def allocate_spec(requirements: DeviceRequirement, docker_requirement: Doc allocated.ssh_password = info["password"] allocated.uuid_key = info["uuid"] allocated.ssh_command = f"ssh {info['username']}@{result['ip']} -p {str(info['port'])}" - allocated.miner_version = info.get("version", 0) + allocated.miner_version = result.get("miner_version", 0) update_allocation_db(result_hotkey, info, True) await self._update_allocation_wandb() bt.logging.info(f"API: Resource {result_hotkey} was successfully allocated") @@ -668,7 +668,7 @@ async def allocate_hotkey(hotkey: str, ssh_key: Optional[str] = None, allocated.ssh_password = info["password"] allocated.uuid_key = info["uuid"] allocated.ssh_command = f"ssh {info['username']}@{result['ip']} -p {str(info['port'])}" - allocated.miner_version = info.get("version", 0) + allocated.miner_version = result.get("miner_version", 0) update_allocation_db(result_hotkey, info, True) await self._update_allocation_wandb() @@ -2877,6 +2877,7 @@ async def _allocate_container_hotkey(self, requirements, hotkey, timeline, publi if register_response and register_response["status"] is True: register_response["ip"] = axon.ip register_response["hotkey"] = axon.hotkey + register_response["miner_version"] = axon.version return register_response else: bt.logging.warning(