()
| 71 | |
| 72 | #[cfg(unix)] |
| 73 | fn set_max_ulimit() -> Result<()> { |
| 74 | use nix::sys::resource::{getrlimit, setrlimit, Resource}; |
| 75 | let (soft, hard) = getrlimit(Resource::RLIMIT_NOFILE)?; |
| 76 | if soft < hard { |
| 77 | setrlimit(Resource::RLIMIT_NOFILE, hard, hard)?; |
| 78 | } |
| 79 | Ok(()) |
| 80 | } |
| 81 | |
| 82 | fn dstack_agent() -> Result<DstackGuestClient<PrpcClient>> { |
| 83 | let address = dstack_types::dstack_agent_address(); |