Skip to content

Commit 083abbf

Browse files
authored
Merge pull request #11 from tinavisnovska/master
dev update: upgrading singularity to v3.
2 parents cf5405d + f2b0bb6 commit 083abbf

File tree

3 files changed

+5
-16
lines changed

3 files changed

+5
-16
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ An installation of Python (version >=_3.6_) is required to run *gvanno*. Check t
6161

6262
##### 1.1: Installation of Singularity (optional)
6363

64-
0. **Note: this has only been tested with Singularity version 2.4.2, your mileage may vary with other versions**.
64+
0. **Note: this works for Singularity version 3.0 and higher**.
6565
1. [Install Singularity](https://sylabs.io/docs/)
6666
2. Test that singularity works by running `singularity --version`
6767
3. If you are in the gvanno directory, build the singularity image like so:

gvanno.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -282,15 +282,15 @@ def run_gvanno(arg_dict, host_directories):
282282
if arg_dict['container'] == 'docker':
283283
container_command_run1 = container_command_run1 + " -w=/workdir/output " + str(DOCKER_IMAGE_VERSION) + " sh -c \""
284284
elif arg_dict['container'] == 'singularity':
285-
container_command_run1 = container_command_run1 + " -W /workdir/output " + 'src/gvanno.simg' + " sh -c \""
285+
container_command_run1 = container_command_run1 + " -W /workdir/output " + 'src/gvanno.sif' + " sh -c \""
286286

287287
if arg_dict['container'] == 'docker':
288288
container_command_run2 = "docker run --rm -t -u " + str(uid) + " -v=" + str(databundle_volume_mapping) + " -v=" + str(output_volume_mapping)
289289
container_command_run2 = container_command_run2 + " -w=/workdir/output " + str(DOCKER_IMAGE_VERSION) + " sh -c \""
290290
docker_command_run_end = '\"'
291291
elif arg_dict['container'] == 'singularity':
292292
container_command_run2 = "singularity exec " + " -B " + str(databundle_volume_mapping) + " -B " + str(output_volume_mapping)
293-
container_command_run2 = container_command_run2 + " -W /workdir/output " + 'src/gvanno.simg' + " sh -c \""
293+
container_command_run2 = container_command_run2 + " -W /workdir/output " + 'src/gvanno.sif' + " sh -c \""
294294
docker_command_run_end = '\"'
295295

296296
## GVANNO|start - Log key information about sample, options and assembly

src/buildSingularity.sh

+2-13
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,8 @@ docker build -t gvanno .
2424
docker tag gvanno localhost:5000/gvanno
2525
docker push localhost:5000/gvanno
2626

27-
# create a temporary singularity def file
28-
declare -r TMPFILE="$(mktemp --suffix 'singularity.def')"
29-
cat > "$TMPFILE" << EOI
30-
Bootstrap: docker
31-
Registry: http://localhost:5000
32-
Namespace:
33-
From: gvanno:latest
34-
EOI
35-
# build singularity image
36-
sudo SINGULARITY_NOHTTPS=1 singularity build gvanno.simg "$TMPFILE"
37-
38-
# remove temp file
39-
rm -f "$TMPFILE"
27+
# build singularity image from the docker cached local gvanno image
28+
sudo SINGULARITY_NOHTTPS=1 singularity build gvanno.sif docker-daemon://gvanno:latest
4029

4130
# stop registry server
4231
docker container stop registry

0 commit comments

Comments
 (0)