Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
aFuerst committed Aug 30, 2024
1 parent a58ae08 commit 9ea2f69
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,10 @@ impl ContainerIsolationService for DockerIsolation {
Ok(p) => p,
Err(e) => return err_val(e, device_resource),
};
let gunicorn_args = format!("GUNICORN_CMD_ARGS=--workers=1 --timeout={} --bind=0.0.0.0:{}", &self.limits_config.timeout_sec, port);
let gunicorn_args = format!(
"GUNICORN_CMD_ARGS=--workers=1 --timeout={} --bind=0.0.0.0:{}",
&self.limits_config.timeout_sec, port
);
env.push(gunicorn_args.as_str());
let mut ports = HashMap::new();
ports.insert(
Expand All @@ -304,10 +307,10 @@ impl ContainerIsolationService for DockerIsolation {
Ok(p) => {
debug!(tid=%tid, "Acquired docker creation semaphore");
Some(p)
},
}
Err(e) => {
bail_error_value!(error=%e, tid=%tid, "Error trying to acquire docker creation semaphore", device_resource);
},
}
},
None => None,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -941,9 +941,9 @@ impl GpuResourceTracker {
}
}
}
pub fn memory_pressure(&self, gpu: &GPU) -> (MemSizeMb,MemSizeMb) {
pub fn memory_pressure(&self, gpu: &GPU) -> (MemSizeMb, MemSizeMb) {
match self.gpu_metadata.get(&gpu.gpu_hardware_id) {
None => (0,0),
None => (0, 0),
Some(meta) => {
let curr = *meta.device_allocated_memory.read();
(curr, meta.hardware_memory_mb)
Expand Down

0 comments on commit 9ea2f69

Please sign in to comment.