diff --git a/README.md b/README.md index a0deab2..bc8a35d 100644 --- a/README.md +++ b/README.md @@ -140,8 +140,7 @@ For more details, we refer to the paper. TODO: add paper link here - ``docker cp : `` (copy whole folder or individual files), e.g., ``docker cp e7ba94d69e94:/app/res ./docker`` - to get container_id call ``docker ps`` -> Note that the Dockerfile uses multiple stages. The first stage builds the executable using rust/cargo and the second stage uses a debian environment to execute it. Therefore, there are no cargo-commands available in the container while running. Line 7 in run.sh will fail, but since it is prebuilded during the build stage, the consecutive commands will work. - +> The Dockerfile uses multiple stages. The first stage builds the executable using rust/cargo and the second stage uses a debian environment to execute it. Therefore, there are no cargo-commands available in the container while running. ## How to Interpret the Output Format Running e.g. `cargo run --release -- -l -c -s -f //TBT-Segmentation/res/logs_wind_front_Lateral/` produces an output that contains the following lines: diff --git a/scripts/run.sh b/scripts/run.sh index d73896b..3f2c18e 100644 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -4,7 +4,12 @@ #!/bin/bash # Build the Rust project -cargo build --release +if grep -q docker /proc/1/cgroup; then + echo "Running inside a Docker container." +else + echo "Not running inside a Docker container." + cargo build --release +fi # Define variables previous_pwd="$(pwd)"