-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
57b0408
commit 6f2c993
Showing
1 changed file
with
21 additions
and
39 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,38 @@ | ||
# Docker and Singularity | ||
|
||
This are the steps to create a Singularity Image File (SIF) for oplab_pipeline. | ||
There exists a Dockerfile as well, but it's recommended to use the SIF image | ||
instead. | ||
|
||
## 1. Build the docker image. | ||
This assumes that you have installed Docker previously. If you haven't, follow [these installation instructions for Docker](https://docs.docker.com/get-docker/). At the root of oplab_pipeline, run | ||
## 1. Build the Singularity image. | ||
This assumes you have installed Singularity previously. If you havent, follow [these installation instructions for Singularity.](https://sylabs.io/guides/master/user-guide/quick_start.html#quick-installation-steps) | ||
|
||
``` | ||
docker build --tag oceanperception/oplab_pipeline . | ||
```sh | ||
sudo singularity build oplab_pipeline.sif oplab_pipeline.def | ||
``` | ||
|
||
Check that your image works correcty by running `auv_nav` help using the following command: | ||
# 3. Run the SIF image. | ||
The previous instruction will have saved a file `oplab_pipeline.sif` in this same directory. This is your containerised image file. You can use this SIF file in any Linux computer with Singularity installed. To see the help, run | ||
|
||
```sh | ||
docker run -it oceanperception/oplab_pipeline auv_nav -h | ||
singularity run oplab_pipeline.sif | ||
``` | ||
|
||
this command should return the following output (as per version 0.1.10): | ||
Run the pipeline using the following command: | ||
- `singularity exec oplab_pipeline.sif auv_nav ARGS` | ||
- `singularity exec oplab_pipeline.sif auv_cal ARGS` | ||
- `singularity exec oplab_pipeline.sif correct_images ARGS` | ||
|
||
``` | ||
● ● Ocean Perception | ||
● ▲ University of Southampton | ||
Copyright (C) 2020 University of Southampton | ||
This program comes with ABSOLUTELY NO WARRANTY. | ||
This is free software, and you are welcome to | ||
redistribute it. | ||
INFO ▸ Running auv_nav version unknown-commit | ||
usage: auv_nav [-h] {parse,process,convert} ... | ||
positional arguments: | ||
{parse,process,convert} | ||
parse Parse raw data and converting it to an intermediate dataformat for further processing. Type | ||
auv_nav parse -h for help on this target. | ||
process Process and/or convert data. Data needs to be saved in the intermediate data format generated | ||
using auv_nav.py parse. Type auv_nav process -h for help on this target. | ||
convert Converts data. | ||
optional arguments: | ||
-h, --help show this help message and exit | ||
``` | ||
## FAQ | ||
|
||
# 2. Convert the docker image to SIF. | ||
This assumes you have installed Singularity previously. If you havent, follow [these installation instructions for Singularity.](https://sylabs.io/guides/master/user-guide/quick_start.html#quick-installation-steps) | ||
If you see the following error: | ||
|
||
```sh | ||
singularity build oplab_pipeline.sif docker-daemon://oceanperception/oplab_pipeline:latest | ||
/opt/oplab_pipeline_env/lib/python3.9/site-packages/joblib/_multiprocessing_helpers.py:45: UserWarning: [Errno 2] No such file or directory. joblib will operate in serial mode | ||
warnings.warn('%s. joblib will operate in serial mode' % (e,)) | ||
``` | ||
|
||
# 3. Run the SIF image. | ||
The previous instruction will have saved a file `oplab_pipeline.sif` in this same directory. This is your containerised image file. You can use this SIF file in any Linux computer with Singularity installed. To use it, run | ||
|
||
```sh | ||
singularity run oplab_pipeline.sif auv_nav -h | ||
``` | ||
run the SIF image with the flag `-B /run/shm:/run/shm` Example: | ||
- `singularity exec -B /run/shm:/run/shm oplab_pipeline.sif auv_nav ARGS` | ||
- `singularity exec -B /run/shm:/run/shm oplab_pipeline.sif auv_cal ARGS` | ||
- `singularity exec -B /run/shm:/run/shm oplab_pipeline.sif correct_images ARGS` |