-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add support for the docker backend (#1)
* feat: add support for the docker backend Signed-off-by: Vassilis Vassiliadis <[email protected]> * docs: add an example to run a small-scale experiment using docker/podman Signed-off-by: Vassilis Vassiliadis <[email protected]> --------- Signed-off-by: Vassilis Vassiliadis <[email protected]>
- Loading branch information
1 parent
f06d38c
commit 85244f5
Showing
5 changed files
with
86 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Run nanopore-geometry-experiment using the Docker backend of ST4SD | ||
|
||
## Prerequisites | ||
|
||
1. A recent version of python 3 - [python 3.7+](https://www.python.org/downloads/) | ||
2. The [docker](https://docs.docker.com/get-docker/) container runtime | ||
3. The [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) command-line utility | ||
|
||
|
||
## Instructions | ||
|
||
You can try out the experiment on your laptop by: | ||
|
||
1. creating a python virtual environment, activating it, and installing the python module `st4sd-runtime-core` | ||
2. cloning this repository | ||
3. launching the experiment | ||
|
||
|
||
For example: | ||
|
||
```bash | ||
#!/usr/bin/env sh | ||
|
||
# Download virtual experiment | ||
git clone https://github.com/st4sd/nanopore-geometry-experiment.git | ||
|
||
# Setup ST4SD runtime-core | ||
python3 -m venv --copies venv | ||
. venv/bin/activate | ||
python3 -m pip install "st4sd-runtime-core" | ||
|
||
# Run experiment | ||
./nanopore-geometry-experiment/docker-example/run.sh | ||
``` | ||
|
||
**Note**: Make sure you run the `git clone` command in a directory that `docker` (or `podman`) can mount later when you execute the experiment. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CoRE2019/GUJVOX_clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env sh | ||
cd $(dirname ${0})/.. | ||
|
||
docker_like_location="" | ||
if ! which docker >/dev/null; then | ||
echo "The docker command is not available on this system, will try to use podman" >&2 | ||
|
||
if location=$(which podman); then | ||
docker_like_location="--dockerExecutableOverride=${location}" | ||
echo "Podman located at ${location}" >&2 | ||
else | ||
echo "No docker or podman command on this system - aborting" >&2 | ||
exit 2 | ||
fi | ||
fi | ||
|
||
# Run experiment | ||
echo "Executing the experiment ..." >&2 | ||
elaunch.py --failSafeDelays=no ${docker_like_location} -l40 \ | ||
--instanceName nanopore-geometry-experiment \ | ||
--manifest manifest.yaml \ | ||
--input docker-example/cif_files.dat \ | ||
--platform docker conf/flowir_package.yaml | ||
|
||
# See outputs of experiment | ||
echo "\n\nMeasured properties are:" >&2 | ||
output_dir=$(ls -td nanopore-geometry-experiment*.instance | head -1) | ||
cat "${output_dir}/output/properties.csv" |