Skip to content

Commit

Permalink
Add instructions to view example script results from Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
prouast committed Nov 12, 2024
1 parent ccaf8ed commit 11b2426
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,7 @@ result = vl(my_video_arr, fps=my_video_fps)
### Example: Run example script with Docker

If you encounter issues installing `vitallens-python` dependencies directly, you can use our Docker image, which contains all necessary tools and libraries.
This docker image is set up to execute the example Python script in `examples/test.py` for you.
Please note that the example script plots won't work when running them through Docker.
This docker image is set up to execute the example Python script in `examples/test.py` for you.

#### Prerequisites

Expand Down Expand Up @@ -231,6 +230,16 @@ docker run vitallens \
--method "VITALLENS"
```

4. View the results

The results will print to the console in text form.

Please note that the example script plots won't work when running them through Docker. To to get the plot as an image file, run:

```
docker cp <container_id>:/app/results.png .
```

## Linting and tests

Before running tests, please make sure that you have an environment variable `VITALLENS_DEV_API_KEY` set to a valid API Key.
Expand Down
1 change: 1 addition & 0 deletions examples/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def run(args=None):
ax1.legend()
if 'respiratory_waveform' in vital_signs: ax2.legend()
plt.show()
plt.savefig('results.png')

def method_type(name):
try:
Expand Down

0 comments on commit 11b2426

Please sign in to comment.