Skip to content

Commit

Permalink
removed error print when running run.sh in docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
root authored and root committed Feb 22, 2024
1 parent d6d0a14 commit 42fd2dc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@ For more details, we refer to the paper. TODO: add paper link here
- ``docker cp <container_id>:<location_png/results> <location_to_be_stored>`` (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 /<your-foulder>/TBT-Segmentation/res/logs_wind_front_Lateral/` produces an output that contains the following lines:
Expand Down
7 changes: 6 additions & 1 deletion scripts/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down

0 comments on commit 42fd2dc

Please sign in to comment.