Skip to content

Commit

Permalink
Merge pull request #90 from k82cn/set_default_work_dir
Browse files Browse the repository at this point in the history
Add default work dir.
  • Loading branch information
Klaus Ma authored Jan 6, 2024
2 parents 23bbf8c + 0721e74 commit b7c79b8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
4 changes: 0 additions & 4 deletions ci/flame-conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,8 @@ applications:
- name: "pi"
shim: Stdio
command: "target/debug/pi-server"
working_directory: "/tmp"
- name: "flmexec"
shim: Log
command: ""
working_directory: "/tmp"
- name: "matrix"
shim: Wasm
command: "examples/matrix/server/target/wasm32-wasi/debug/matrix_server.wasm"
working_directory: "/tmp"
6 changes: 6 additions & 0 deletions common/src/apis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,13 @@ pub enum Shim {
pub struct Application {
pub name: String,
pub shim: Shim,
#[serde(default)]
pub command: String,
#[serde(default)]
pub arguments: Vec<String>,
#[serde(default)]
pub environments: Vec<String>,
#[serde(default = "default_work_dir")]
pub working_directory: String,
}

Expand Down Expand Up @@ -436,3 +438,7 @@ impl fmt::Display for TaskGID {
write!(f, "{}/{}", self.ssn_id, self.task_id)
}
}

fn default_work_dir() -> String {
String::from("/tmp")
}
4 changes: 0 additions & 4 deletions installer/flame-conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,9 @@ storage: mem
applications:
- name: "flmexec"
shim: Log
command: ""
working_directory: "/tmp"
- name: "pi"
shim: Stdio
command: "/opt/pi-server"
working_directory: "/tmp"
- name: "matrix"
shim: Wasm
command: "/opt/matrix_server.wasm"
working_directory: "/tmp"

0 comments on commit b7c79b8

Please sign in to comment.