Open guzman-raphael opened 1 week ago
struct Annotation { api_ver: String // Adopt the version lib name: String, version: String, // better option could be used later for inequalities description: String, } struct Pod { annotation: Annotation, command: String, gpu: Option<GPUSpecRequirement>, image_digest: String, // resolved docker image+digest input_stream_map: BTreeMap<String, PathBuf>, // might default to /output but needs output_dir: PathBuf, // here PathBuf will be relative to output_dir output_stream_map: BTreeMap<String, PathBuf>, recommended_cpus: f32, // e.g. 0.25 recommended_memory: u64, // e.g. 2GiB -> 2147483648 bytes sha256: String, // pod hash, might be a better type source: String, // Git Commmit permalink } impl Pod { fn new(...) -> Self {...} // Use the new derivative default lib } impl OrcaHash for Pod { fn to_yaml(&self) -> String pub fn compute_hash(&self) -> String fn from_yaml(yaml: &str, annotation: &str) -> Self }