Compare commits

...

11 commits

32 changed files with 1010 additions and 268 deletions

4
.gitignore vendored
View file

@ -13,3 +13,7 @@
.externalNativeBuild
.cxx
local.properties
# useless
/.idea/deploymentTargetSelector.xml

View file

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="deploymentTargetSelector">
<selectionStates>
<SelectionState runConfigName="app">
<option name="selectionMode" value="DROPDOWN" />
<DropdownSelection timestamp="2024-07-23T14:58:53.724547432Z">
<Target type="DEFAULT_BOOT">
<handle>
<DeviceId pluginId="LocalEmulator" identifier="path=/home/user/.android/avd/Pixel_Fold_API_34.avd" />
</handle>
</Target>
</DropdownSelection>
<DialogSelection />
</SelectionState>
</selectionStates>
</component>
</project>

View file

@ -1,47 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EmulatorDisplays">
<option name="displayStateByAvdFolder">
<map>
<entry key="$USER_HOME$/.android/avd/Automotive_1080p_landscape_API_33.avd">
<value>
<MultiDisplayState>
<option name="displayDescriptors">
<list>
<DisplayDescriptor>
<option name="height" value="1180" />
<option name="width" value="700" />
</DisplayDescriptor>
<DisplayDescriptor>
<option name="displayId" value="6" />
<option name="height" value="600" />
<option name="width" value="400" />
</DisplayDescriptor>
</list>
</option>
<option name="panelState">
<PanelState>
<option name="splitPanel">
<SplitPanelState>
<option name="proportion" value="0.6363636255264282" />
<option name="firstComponent">
<PanelState>
<option name="displayId" value="0" />
</PanelState>
</option>
<option name="secondComponent">
<PanelState>
<option name="displayId" value="6" />
</PanelState>
</option>
</SplitPanelState>
</option>
</PanelState>
</option>
</MultiDisplayState>
</value>
</entry>
</map>
</option>
</component>
</project>

View file

@ -22,7 +22,7 @@ android {
// don't forget to add another "s this is counter intuitive I know but not my fault
buildConfigField("String", "VASTAI_KEY", "null")
buildConfigField("String", "VASIAI_API_ENDPOINT", "\"https://console.vast.ai/api/v0\"")
buildConfigField("String", "VASIAI_API_ENDPOINT", "\"https://cloud.vast.ai/api/v0\"")
}
buildTypes {

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View file

@ -2,5 +2,7 @@ package eu.m724.vastapp.vastai
enum class ApiRoute(val path: String, val method: String) {
SHOW_USER("/users/current", "GET"),
GET_INSTANCES("/instances", "GET")
GET_INSTANCES("/instances", "GET"),
INSTANCES_COUNT("/instances/count", "GET"),
MACHINES_MAINTENANCES("/machines/maintenances", "GET")
}

View file

@ -0,0 +1,17 @@
package eu.m724.vastapp.vastai
class Utils {
companion object {
fun mbToMib(mb: Number): Double {
return mb.toDouble() * 1.048576
}
fun gbToGib(gb: Number): Double {
return gb.toDouble() * 1.073741824
}
fun mibToMb(mib: Number): Double {
return mib.toDouble() / 1.073741824
}
}
}

View file

@ -0,0 +1,53 @@
package eu.m724.vastapp.vastai.data
import org.json.JSONObject
/**
* represents an instance, rented or not
* units are in decimal bytes that is 1000 MB GB
*/
data class Instance(
val id: Int,
val machine: Machine,
/** memory available in instance in MB */
val instanceMemoryMb: Int,
/** cpu cores available in instance like 6.1 */
val instanceCpuCores: Double,
/** how many (same) gpus the instance has*/
val instanceNumGpus: Int,
/** "Deep Learning Performance", it's very specific like 15.679831880208411 */
val dlPerf: Double,
/** since when the instance is available for rental in unix seconds
* if rented by you, it's since when the machine is rented
* at least I think because it's recent and unavailable machines don't have that */
val startDate: Long,
/** when instance will expire as unix seconds, like 1861891577 */
val endDate: Long,
/** is the instance available for rental */
val available: Boolean
) {
companion object {
fun fromJson(json: JSONObject): Instance {
return Instance(
json.getInt("id"),
Machine.fromJson(json),
json.getInt("cpu_ram"),
json.getDouble("cpu_cores_effective"),
json.getInt("num_gpus"),
json.getDouble("dlperf"),
json.getDouble("dph_base"),
json.getDouble("storage_cost"),
json.getDouble("inet_down_cost"),
json.getDouble("inet_up_cost"),
json.getBoolean("is_bid"),
json.getDouble("min_bid"),
json.getDouble("start_date").toLong(),
json.getLong("end_date"),
json.getBoolean("rentable")
)
}
}
}

View file

@ -0,0 +1,125 @@
package eu.m724.vastapp.vastai.data
import eu.m724.vastapp.vastai.Utils
import org.json.JSONObject
/**
* represents a machine
* that is the machine with physical resources
*/
data class Machine(
val id: Int,
/** machine host's id, that is the account the machine is listed by */
val hostId: Int,
/** motherboard name, like X99 or TUF GAMING X570 */
val motherboardName: String,
/** machine ram in MB */
val memory: Double,
/** cpu architecture, like amd64 */
val cpuArch: String,
/** machine cpu cores like 12 */
val cpuCores: Int,
/** readable cpu name like xeon something */
val cpuName: String,
/** only when viewing a not rented instance */
val cpuGhz: Double,
/** disk bandwidth in MB/s (TODO find out) like 1225.1 */
val diskBandwidth: Double,
/** disk name, like nvme (literally) or a model like SPCC M.2 PCIe SSD */
val diskName: String,
/** available disk space on host in GB (TODO find out) like 95.833336 */
val diskSpace: Double,
/** pcie gpu lanes like 8 */
val gpuLanes: Int,
/** vram bandwidth in GB/s (TODO find out) like 3518 */
val gpuMemoryBandwidth: Double,
/** gpu name like RTX 4090 */
val gpuName: String,
/** vram in MB */
val gpuMemoryMb: Int,
/** max cuda version like 12.2 */
val cudaMaxGood: Double,
/** nvidia driver version like 545.23.06 */
val driverVersion: String,
/** not sure, changes with gpu series, like 860 for rtx 3000 series*/
val computeCap: Int,
/** pcie version like 3.0 or 4.0 */
val pcieGen: Double,
/** pcie bandwidth in GB/s (TODO find out) like 11.7 */
val pcieBandwidth: Double,
/** download speed in Mbps */
val inetDownSpeedMbps: Double,
/** upload speed in Mbps */
val inetUpSpeedMbps: Double,
/** amount of open ports like 99 */
val directPortCount: Int,
/** public ip address of the machine, like 192.0.2.1 */
val publicAddress: String,
/** self explanatory but not sure if matters */
val isStaticAddress: Boolean,
/** formatted as City, CC like Quebec, CA */
val geolocation: String,
/** reliability of the machine 0-1 */
val reliability: Double,
/** how is the machine hosted, 0 normal, 1 datacenter */
val hostingType: Int,
val verification: MachineVerification
) {
companion object {
fun fromJson(json: JSONObject): Machine {
return Machine(
json.getInt("machine_id"),
json.getInt("host_id"),
json.getString("mobo_name"),
json.getInt("cpu_ram") / json.getDouble("gpu_frac"),
json.getString("cpu_arch"),
json.getInt("cpu_cores"),
json.getString("cpu_name"),
json.optDouble("cpu_ghz", -1.0),
json.getDouble("disk_bw"),
json.getString("disk_name"),
json.getDouble("disk_space"),
json.getInt("gpu_lanes"),
json.getDouble("gpu_mem_bw"),
json.getString("gpu_name"),
Utils.mibToMb(json.getInt("gpu_ram")).toInt(),
json.getDouble("cuda_max_good"),
json.getString("driver_version"),
json.getInt("compute_cap"),
json.getDouble("pci_gen"),
json.getDouble("pcie_bw"),
json.getDouble("inet_down"),
json.getDouble("inet_up"),
json.getInt("direct_port_count"),
json.getString("public_ipaddr"),
json.getBoolean("static_ip"),
json.getString("geolocation"),
json.getDouble("reliability2"),
json.getInt("hostingType"),
MachineVerification.fromString(json.getString("verification"))
)
}
}
}
enum class MachineVerification {
VERIFIED, UNVERIFIED, VERIFICATION_REMOVED;
companion object {
fun fromString(text: String): MachineVerification {
return when (text) {
"verified" -> VERIFIED
"deverified" -> VERIFICATION_REMOVED
else -> UNVERIFIED
}
}
}
}

View file

@ -0,0 +1,20 @@
package eu.m724.vastapp.vastai.data
data class Pricing(
/** if you're bidding this instance, always false in marketplace (or not?) */
val isBid: Boolean,
/** the minimum bid you can make, as dph
* website shows more I don't know why */
val minBid: Double,
/** dollars per hour excluding storage costs */
val dphBase: Double,
/** storage cost 1 GB / 30 days (720 hours)
* to get hourly, divide it by 720 and multiply by GBs TODO remove this comment */
/** storage cost GB/hr */
val storageCost: Double,
/** dollars per 1 GB of download (on site it shows TB as 1024 so TODO gb or gib?) **/
val downloadCost: Double,
/** dollars per 1 GB of upload (on site it shows TB as 1024) **/
val uploadCost: Double,
)

View file

@ -0,0 +1,45 @@
package eu.m724.vastapp.vastai.data
import android.net.InetAddresses
import java.net.InetAddress
data class RentedInstance(
val instance: Instance,
/** the rental id, apparently not rented id is different */
val rentalId: Int,
/** rented disk space in MB */
val diskSpace: Int,
/** disk usage in MB */
val diskUsage: Int,
/** vram usage in MB */
val vramUsage: Int,
/** ram usage in MB */
val memoryUsage: Int,
/** gpu utilization 0.0 - 1.0 */
val gpuUsage: Double,
/** cpu utilization 0.0 - 1.0 */
val cpuUsage: Double,
/** gpu temperature in celsius */
val gpuTemperature: Double,
/** MB downloaded in the lifetime of the instance
* there is like 20 gb added and I don't know why */
val downloaded: Int,
/** MB downloaded in the lifetime of the instance
* this is also wrong but not as much */
val uploaded: Int,
/** hostname of the ssh proxy */
val sshProxyHost: String,
val sshProxyPort: Int,
/** the docker image that runs on the instance */
val image: String,
/** label set by user */
val label: String,
/** local ip addresses?
* I think if you have another instance on the same machine you can use it */
val localIpAddresses: List<InetAddress>
)

View file

@ -1,170 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector>

View file

@ -2,29 +2,29 @@
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
android:viewportWidth="28.575"
android:viewportHeight="28.575">
<group android:scaleX="0.65"
android:scaleY="0.65"
android:translateX="5.000625"
android:translateY="5.000625">
<path
android:pathData="M5.661,8.863 L14.288,22.914 22.914,8.863V5.661L14.288,19.712 5.661,5.661Z"
android:strokeLineJoin="round"
android:strokeWidth="0.165"
android:fillColor="#ffffff"
android:strokeLineCap="round">
<aapt:attr name="android:strokeColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:startX="5.579"
android:startY="14.288"
android:endX="22.996"
android:endY="14.288"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
<item android:offset="0" android:color="#FFFFFFFF"/>
<item android:offset="1" android:color="#00FFFFFF"/>
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</group>
</vector>

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 716 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 982 B

After

Width:  |  Height:  |  Size: 502 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 940 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#000000</color>
</resources>

69
dev_assets/common keys Normal file
View file

@ -0,0 +1,69 @@
lines starting with with N are not included in code
{
"id": "int", // the instance id
N"bundle_id": "int",
N"bw_nvlink": "float",
"compute_cap": "int", // not sure, but related to gpu series
"cpu_arch": "str", // cpu architecture
"cpu_cores": "int", // total cpu cores
"cpu_cores_effective": "float", // available cpu cores on instance
"cpu_name": "str", // the cpu name
"cpu_ram": "int", // memory available on instance in MB
"credit_discount_max": "float",
"cuda_max_good": "float", // "max cuda" on website
"direct_port_count": "int", // how many open ports
"disk_bw": "float", // disk bandwidth (?) in MB/s
"disk_name": "str", // disk "name" which doesn't always make sense
"disk_space": "float", // available disk space on host
"dlperf": "float", // Deep Learning Performance as on site
N"dlperf_per_dphtotal": "float", // dlperf divided by dph_total
"dph_base": "float", // dollars per hour excluding storage costs
N"dph_total": "float", // dollars per hour including storage costs (storage is set in request)
"driver_version": "str", // self explanatory
N"duration": "float", // the length of time the instance can be rented, in seconds, the site assumes all months have 30 days
"end_date": "float", // when instance will expire as unix timestamp, basically the above
N"external": "bool?", // null if not rented, otherwise not sure but seems always false
N"flops_per_dphtotal": "float", // total_flops divided by dph_total
"geolocation": "str", // formatted as City, CC
N"gpu_display_active": "bool",
"gpu_frac": "float", // percentage of system ram available to instance
"gpu_lanes": "int", // pcie gpu lanes
"gpu_mem_bw": "float", // vram bandwidth in GB/s
"gpu_name": "str", // the gpu name
"gpu_ram": "int", // vram in MB
N"has_avx": "int", // if the cpu has avx which is almost always
"host_id": "int", // host's id
"hosting_type": "int", // 0 normal, 1 datacenter
"inet_down": "float", // download speed in Mbps
"inet_down_cost": "float", // cost of 1 GB of download (on site it shows TB as 1024)
"inet_up": "float", // upload speed in Mbps
"inet_up_cost": "float", // cost of 1 GB of upload (on site it shows TB as 1024)
"is_bid": "bool", // if you're bidding this instance, always false in marketplace (or not?)
N"logo": "str", // the logo, displayed on the website on the left side, it's constant now but I remember it being different for some machines
"machine_id": "int", // self explanatory
"min_bid": "float", // the minimum bid you can make, as dph. website shows more I don't know why
"mobo_name": "str", // motherboard name, like disk name doesn't always make sense
"num_gpus": "int", // self explanatory
N"os_version": "str", // ubuntu version running on the machine
"pci_gen": "float", // pcie version
"pcie_bw": "float", // pcie bandwidth in GB/s
"public_ipaddr": "str", // public ip address of the machine
"rentable": "bool", // is the machine available for rental
N"score": "float",
"start_date": "float", // unix seconds, since when the instance is available for rental (or is rented if rented by you), at least I think because it's recent and unavailable machines don't have that
"static_ip": "bool", // self explanatory but not sure if matters
"storage_cost": "float", // storage cost 1 GB / 30 days (720 hours)
N"storage_total_cost": "float", // cost of storage per hour (size provided in query)
"total_flops": "float",
"verification": "str", // verified / unverified / deverified
N"vram_costperhour": "float",
N"webpage": "NoneType",
"reliability2": "float", // reliability of the machine
N"search": "dict", // the cost of the machine with specific parameters, mostly repeating what was already provided and the rest can be calculated
N"instance": "dict",
N"time_remaining": "str",
N"time_remaining_isbid": "str",
N"internet_up_cost_per_tb": "float", // cost of 1 TiB of upload (because inet_down_cost is for 1 GB)
N"internet_down_cost_per_tb": "float" // cost of 1 TiB of download (because inet_down_cost is for 1 GB)
}

View file

@ -0,0 +1,20 @@
{
"ask_contract_id": "int",
"bundled_results": "int",
"cpu_ghz": "float",
"driver_vers": "int",
"geolocode": "int",
"gpu_arch": "str",
"gpu_ids": "list",
"gpu_total_ram": "int",
"hostname": "NoneType",
"reliability": "float",
"reliability_mult": "float",
"rented": "bool",
"vericode": "int",
"rn": "int",
"dph_total_adj": "float",
"discount_rate": "float",
"discounted_hourly": "float",
"discounted_dph_total": "float"
}

99
dev_assets/market.json Normal file
View file

@ -0,0 +1,99 @@
{
"id": 7470170,
"ask_contract_id": 7470170,
"bundle_id": 1196100907,
"bundled_results": 26607,
"bw_nvlink": 0,
"compute_cap": 750,
"cpu_arch": "amd64",
"cpu_cores": 80,
"cpu_cores_effective": 10,
"cpu_ghz": 3.6,
"cpu_name": "Xeon® E5-2698 v4 ",
"cpu_ram": 48354,
"credit_discount_max": 0.4,
"cuda_max_good": 12.3,
"direct_port_count": 249,
"disk_bw": 2153.265113956507,
"disk_name": "CT2000P3SSD8",
"disk_space": 93.61374053605482,
"dlperf": 11.59033456697642,
"dlperf_per_dphtotal": 35.02613115613797,
"dph_base": 0.32,
"dph_total": 0.33090536078077043,
"driver_version": "545.23.06",
"driver_vers": 545023006,
"duration": 139708875.7106862,
"end_date": 1861891577,
"external": null,
"flops_per_dphtotal": 36.0947189607878,
"geolocation": "Indiana, US",
"geolocode": 433199645,
"gpu_arch": "nvidia",
"gpu_display_active": false,
"gpu_frac": 0.125,
"gpu_ids": [
54806
],
"gpu_lanes": 16,
"gpu_mem_bw": 454.7,
"gpu_name": "Q RTX 8000",
"gpu_ram": 46080,
"gpu_total_ram": 46080,
"has_avx": 1,
"host_id": 32241,
"hosting_type": 0,
"hostname": null,
"inet_down": 711.3,
"inet_down_cost": 0.00009765625,
"inet_up": 492.9,
"inet_up_cost": 0.00009765625,
"is_bid": false,
"logo": "/static/logos/vastai_small2.png",
"machine_id": 15167,
"min_bid": 0.32,
"mobo_name": "X10DRG",
"num_gpus": 1,
"os_version": "20.04",
"pci_gen": 3,
"pcie_bw": 10.7,
"public_ipaddr": "192.0.2.1",
"reliability": 0.999064,
"reliability_mult": 0.990725,
"rentable": true,
"rented": false,
"score": 37.09424527115246,
"start_date": 1722179423.04143,
"static_ip": true,
"storage_cost": 0.15,
"storage_total_cost": 0.010905360780770422,
"total_flops": 11.943936000000003,
"verification": "verified",
"vericode": 1,
"vram_costperhour": 0.007555555555555556,
"webpage": null,
"rn": 1,
"dph_total_adj": 0.330905541700502,
"reliability2": 0.999064,
"discount_rate": 0.3900603985065931,
"discounted_hourly": 0.1248193275221098,
"discounted_dph_total": 0.20608603325866065,
"search": {
"gpuCostPerHour": 0.32,
"diskHour": 0.010905360780770422,
"totalHour": 0.33090536078077043,
"discountTotalHour": 0,
"discountedTotalPerHour": 0.20608603325866065
},
"instance": {
"gpuCostPerHour": 0,
"diskHour": 0.010905360780770422,
"totalHour": 0.010905360780770422,
"discountTotalHour": 0,
"discountedTotalPerHour": 0.010905360780770422
},
"time_remaining": "",
"time_remaining_isbid": "",
"internet_up_cost_per_tb": 0.1,
"internet_down_cost_per_tb": 0.1
}

View file

@ -0,0 +1,37 @@
{
"inet_up_billed": "float", // MB downloaded in the lifetime of the instance with 20 gb added
"inet_down_billed": "float", // MB uploaded in the lifetime of the instance with a few hundred mb added
"credit_balance": "NoneType",
"credit_discount": "NoneType",
"host_run_time": "float", // always 2592000 which is 30 unix days
"client_run_time": "float", // always 1.1
"gpu_totalram": "int", // vram of all gpus combined
"ssh_idx": "str", // id of the ssh proxy, sshN.vast.ai
"ssh_host": "str", // ssh proxy hostname
"ssh_port": "int", // ssh proxy port
"actual_status": "str", // exited or running
"intended_status": "str", // "running" if the machine is started or "stopped"
"cur_state": "str",
"next_state": "str",
"template_hash_id": "str",
"image_uuid": "str", // the docker image that runs on the instance
"image_args": "list",
"image_runtype": "str", // "ssh" if has ssh, "ssh_direc" if can connect directly, "ssh_proxy" if can connect via proxy. other types probably exist
"extra_env": "list", // docker arguments and environment variables, set in iamge config
"onstart": "str", // script that runs on start, set in iamge config
"label": "NoneType", // label set by user
"jupyter_token": "str",
"status_msg": "str", // status but longer
"gpu_util": "float", // 0 - 100
"disk_util": "float", // disk GB used
"disk_usage": "float", // same as above?
"gpu_temp": "float", // gpu temperature in celsius
"local_ipaddrs": "str", // local ip addresses? I think if you have another instance on the same machine you can use it. separated with spaces and often ends with \n
"direct_port_end": "int", // highest port number assigned to instance
"direct_port_start": "int", // lowest port number assigned to instance
"cpu_util": "float", // 0 - 100
"mem_usage": "float", // GB of ram used
"mem_limit": "float",
"vmem_usage": "float", // GiB of vram used
"machine_dir_ssh_port": "int" // used to communicate with a stopped instance, to get data from it?
}

345
dev_assets/rented.json Normal file
View file

@ -0,0 +1,345 @@
{
"is_bid": false,
"inet_up_billed": null,
"inet_down_billed": null,
"external": false,
"webpage": null,
"logo": "/static/logos/vastai_small2.png",
"rentable": true,
"compute_cap": 750,
"credit_balance": null,
"credit_discount": null,
"credit_discount_max": 0.4,
"driver_version": "545.23.06",
"cuda_max_good": 12.3,
"machine_id": 15167,
"hosting_type": null,
"public_ipaddr": "192.0.2.1",
"geolocation": "Indiana, US",
"flops_per_dphtotal": 36.0947189607878,
"dlperf_per_dphtotal": 49.495015618229196,
"reliability2": 0.9990642,
"host_run_time": 2592000,
"client_run_time": 1.1,
"host_id": 32241,
"id": 11690143,
"bundle_id": 369201113,
"num_gpus": 1,
"total_flops": 11.943936000000003,
"min_bid": 0.32,
"dph_base": 0.32,
"dph_total": 0.33090536078077043,
"gpu_name": "Q RTX 8000",
"gpu_ram": 46080,
"gpu_totalram": 46080,
"vram_costperhour": 0.00000718110591972158,
"gpu_display_active": false,
"gpu_mem_bw": 456.1,
"bw_nvlink": 0,
"direct_port_count": 250,
"gpu_lanes": 16,
"pcie_bw": 10.7,
"pci_gen": 3,
"dlperf": 16.378166,
"cpu_name": "Xeon® E5-2698 v4 ",
"mobo_name": "X10DRG",
"cpu_ram": 386836,
"cpu_cores": 80,
"cpu_cores_effective": 10,
"gpu_frac": 0.125,
"has_avx": 1,
"disk_space": 52.345731747698025,
"disk_name": "CT2000P3SSD8",
"disk_bw": 2153.265113956507,
"inet_up": 492.9,
"inet_down": 711.3,
"start_date": 1722182542.198361,
"end_date": 1861891577,
"duration": 139709031.66053724,
"storage_cost": 0.15,
"inet_up_cost": 0.00009765625,
"inet_down_cost": 0.00009765625,
"storage_total_cost": 0.010905360780770422,
"os_version": "20.04",
"verification": "verified",
"static_ip": true,
"score": 49.03601864139198,
"cpu_arch": "amd64",
"ssh_idx": "8",
"ssh_host": "ssh8.vast.ai",
"ssh_port": 32312,
"actual_status": null,
"intended_status": "running",
"cur_state": "running",
"next_state": "running",
"template_hash_id": "807e65d5d0248767c61fc09001eedcec",
"image_uuid": "pytorch/pytorch:latest",
"image_args": [],
"image_runtype": "ssh ssh_direc ssh_proxy",
"extra_env": [
[
"-p 8080:8080",
"1"
],
[
"-p 8081:8081",
"1"
],
[
"-p 8082:8082",
"1"
],
[
"-p 8083:8083",
"1"
],
[
"-p 8084:8084",
"1"
],
[
"JUPYTER_TYPE",
"lab"
]
],
"onstart": "",
"label": null,
"jupyter_token": "d69c454bc0c778419bcbf932fd35a4f125e4c93286befd5c8c8cc69ed0776928",
"status_msg": null,
"gpu_util": null,
"disk_util": -1,
"disk_usage": -1,
"gpu_temp": null,
"local_ipaddrs": "10.0.1.15 172.17.0.1 \n",
"direct_port_end": -1,
"direct_port_start": -1,
"cpu_util": 0,
"mem_usage": null,
"mem_limit": null,
"vmem_usage": null,
"machine_dir_ssh_port": 41999,
"search": {
"gpuCostPerHour": 0.32,
"diskHour": 0.010905360780770422,
"totalHour": 0.33090536078077043,
"discountTotalHour": 0,
"discountedTotalPerHour": 0.33090536078077043
},
"instance": {
"gpuCostPerHour": 0,
"diskHour": 0.010905360780770422,
"totalHour": 0.010905360780770422,
"discountTotalHour": 0,
"discountedTotalPerHour": 0.010905360780770422
},
"time_remaining": "",
"time_remaining_isbid": "",
"internet_up_cost_per_tb": 0.1,
"internet_down_cost_per_tb": 0.1
},
{
"instances": [
{
"is_bid": false,
"inet_up_billed": 2447.36,
"inet_down_billed": 136192,
"external": false,
"webpage": null,
"logo": "/static/logos/vastai_small2.png",
"rentable": true,
"compute_cap": 860,
"credit_balance": null,
"credit_discount": null,
"credit_discount_max": 0.4,
"driver_version": "535.161.07",
"cuda_max_good": 12.2,
"machine_id": 20697,
"hosting_type": null,
"public_ipaddr": "198.51.100.194",
"geolocation": "Poland, PL",
"flops_per_dphtotal": 195.9744340481859,
"dlperf_per_dphtotal": 150.1174786976624,
"reliability2": 0.9941465,
"host_run_time": 1,
"client_run_time": 1,
"host_id": 78246,
"id": 11698439,
"bundle_id": 354359201,
"num_gpus": 1,
"total_flops": 12.386304,
"min_bid": 0.04933333,
"dph_base": 0.04933333333333333,
"dph_total": 0.06320367276557347,
"gpu_name": "RTX 3060",
"gpu_ram": 12288,
"gpu_totalram": 12288,
"vram_costperhour": 0.000005143528057094195,
"gpu_display_active": false,
"gpu_mem_bw": 313.2,
"bw_nvlink": 0,
"direct_port_count": 10,
"gpu_lanes": 4,
"pcie_bw": 3.1,
"pci_gen": 3,
"dlperf": 9.487976,
"cpu_name": "AMD Athlon 3000G with Radeon Vega Graphics",
"mobo_name": "B450 Gaming K4",
"cpu_ram": 32012,
"cpu_cores": 4,
"cpu_cores_effective": 2,
"gpu_frac": 0.5,
"has_avx": 1,
"disk_space": 9.986644391212897,
"disk_name": "ADATA SX8200PNP",
"disk_bw": 1446.8719999999998,
"inet_up": 412.1,
"inet_down": 411.7,
"start_date": 1722245891.158758,
"end_date": 1722416413,
"duration": 169075.1312777996,
"storage_cost": 1,
"inet_up_cost": 0.0087890625,
"inet_down_cost": 0.0087890625,
"storage_total_cost": 0.013870339432240135,
"os_version": "20.04",
"verification": "verified",
"static_ip": false,
"score": 141.80996241478587,
"cpu_arch": "amd64",
"ssh_idx": "4",
"ssh_host": "ssh4.vast.ai",
"ssh_port": 18438,
"actual_status": "running",
"intended_status": "running",
"cur_state": "running",
"next_state": "running",
"template_hash_id": "807e65d5d0248767c61fc09001eedcec",
"image_uuid": "pytorch/pytorch:latest",
"image_args": [],
"image_runtype": "ssh ssh_direc ssh_proxy",
"extra_env": [
[
"-p 8080:8080",
"1"
],
[
"-p 8081:8081",
"1"
],
[
"-p 8082:8082",
"1"
],
[
"-p 8083:8083",
"1"
],
[
"-p 8084:8084",
"1"
],
[
"JUPYTER_TYPE",
"lab"
]
],
"onstart": "",
"label": "g",
"jupyter_token": "0254c2230989f5aefc9c084d27d8879a9c4e2953aa4ad135058ac02e2cea65e8",
"status_msg": "success, running pytorch/pytorch_latest/ssh",
"gpu_util": 0,
"disk_util": 0.27399998903274536,
"disk_usage": 0.27399998903274536,
"gpu_temp": 35.999966,
"local_ipaddrs": "192.168.101.16 172.17.0.1 \n",
"direct_port_end": 1396,
"direct_port_start": 1383,
"cpu_util": 0,
"mem_usage": 0.02306048,
"mem_limit": 22.25078272,
"vmem_usage": 0.264648,
"machine_dir_ssh_port": 1399,
"search": {
"gpuCostPerHour": 0.04933333333333333,
"diskHour": 0.013870339432240135,
"totalHour": 0.06320367276557347,
"discountTotalHour": 0,
"discountedTotalPerHour": 0.06320367276557347
},
"instance": {
"gpuCostPerHour": 0.04933333333333333,
"diskHour": 0.013870339432240135,
"totalHour": 0.06320367276557347,
"discountTotalHour": 0,
"discountedTotalPerHour": 0
},
"time_remaining": "Unlimited",
"time_remaining_isbid": "Unlimited",
"internet_up_cost_per_tb": 9,
"internet_down_cost_per_tb": 9,
"ports": {
"22/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "1384"
},
{
"HostIp": "::",
"HostPort": "1384"
}
],
"8080/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "1396"
},
{
"HostIp": "::",
"HostPort": "1396"
}
],
"8081/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "1389"
},
{
"HostIp": "::",
"HostPort": "1389"
}
],
"8082/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "1393"
},
{
"HostIp": "::",
"HostPort": "1393"
}
],
"8083/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "1388"
},
{
"HostIp": "::",
"HostPort": "1388"
}
],
"8084/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "1383"
},
{
"HostIp": "::",
"HostPort": "1383"
}
]
}
}
]
}

139
dev_assets/rented_bid.json Normal file
View file

@ -0,0 +1,139 @@
{
"is_bid": true,
"inet_up_billed": null,
"inet_down_billed": null,
"external": false,
"webpage": null,
"logo": "/static/logos/vastai_small2.png",
"rentable": true,
"compute_cap": 860,
"credit_balance": null,
"credit_discount": null,
"credit_discount_max": 0.1,
"driver_version": "555.42.06",
"cuda_max_good": 12.5,
"machine_id": 11196,
"hosting_type": null,
"public_ipaddr": "192.0.2.1",
"geolocation": "Quebec, CA",
"flops_per_dphtotal": 246.2332813095939,
"dlperf_per_dphtotal": 230.23278807938019,
"reliability2": 0.9879819,
"host_run_time": 1,
"client_run_time": 1.1,
"host_id": 1820,
"id": 11690200,
"bundle_id": 368908098,
"num_gpus": 2,
"total_flops": 71.540736,
"min_bid": 0.2905405,
"dph_base": 0.276,
"dph_total": 0.29054048104102725,
"gpu_name": "RTX 3090",
"gpu_ram": 24576,
"gpu_totalram": 49152,
"vram_costperhour": 0.00000591106121909642,
"gpu_display_active": false,
"gpu_mem_bw": 788.2,
"bw_nvlink": 0,
"direct_port_count": 200,
"gpu_lanes": 16,
"pcie_bw": 11.7,
"pci_gen": 3,
"dlperf": 66.891945,
"cpu_name": "Xeon® E5-2697 v2 ",
"mobo_name": "X9DRi",
"cpu_ram": 128875,
"cpu_cores": 48,
"cpu_cores_effective": 24,
"gpu_frac": 0.5,
"has_avx": 1,
"disk_space": 52.345731747698025,
"disk_name": "CT1000MX500SSD1",
"disk_bw": 1270.7,
"inet_up": 869,
"inet_down": 1099.5,
"start_date": 1722182960.6450586,
"end_date": 4102462741,
"duration": 2380279743.5838623,
"storage_cost": 0.19999999999999998,
"inet_up_cost": 0.004,
"inet_down_cost": 0.0026666666666666666,
"storage_total_cost": 0.01454048104102723,
"os_version": "20.04",
"verification": "verified",
"static_ip": false,
"score": 205.5248038679501,
"cpu_arch": "amd64",
"ssh_idx": "6",
"ssh_host": "ssh6.vast.ai",
"ssh_port": 10200,
"actual_status": "loading",
"intended_status": "running",
"cur_state": "running",
"next_state": "running",
"template_hash_id": "807e65d5d0248767c61fc09001eedcec",
"image_uuid": "pytorch/pytorch:latest",
"image_args": [],
"image_runtype": "ssh ssh_direc ssh_proxy",
"extra_env": [
[
"-p 8080:8080",
"1"
],
[
"-p 8081:8081",
"1"
],
[
"-p 8082:8082",
"1"
],
[
"-p 8083:8083",
"1"
],
[
"-p 8084:8084",
"1"
],
[
"JUPYTER_TYPE",
"lab"
]
],
"onstart": "",
"label": null,
"jupyter_token": "8e1559b5ff3a3665355b1ca79229a9cd32255cded6aaa5ea199100caa6e61440",
"status_msg": "WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.\n1d30a5ea26409952c71bc4f219f74cb1a621cf6a89671cc4acc24db05560e4c4\n",
"gpu_util": null,
"disk_util": -1,
"disk_usage": -1,
"gpu_temp": null,
"local_ipaddrs": "192.168.2.23 10.8.0.38 10.10.9.3 172.17.0.1 \n",
"direct_port_end": -1,
"direct_port_start": -1,
"cpu_util": 0,
"mem_usage": null,
"mem_limit": null,
"vmem_usage": null,
"machine_dir_ssh_port": 50399,
"search": {
"gpuCostPerHour": 0.276,
"diskHour": 0.01454048104102723,
"totalHour": 0.29054048104102725,
"discountTotalHour": 0,
"discountedTotalPerHour": 0.29054048104102725
},
"instance": {
"gpuCostPerHour": 0,
"diskHour": 0.01454048104102723,
"totalHour": 0.01454048104102723,
"discountTotalHour": 0,
"discountedTotalPerHour": 0.01454048104102723
},
"time_remaining": "",
"time_remaining_isbid": "",
"internet_up_cost_per_tb": 4.096,
"internet_down_cost_per_tb": 2.7306666666666666
}