Skip to content

Commit 2f5d024

Browse files
committed
Updated bind option for Singularity container.
- Allows creation of astropy cache in home directory if needed. - Changed PermissionError to OSError
1 parent 75490d9 commit 2f5d024

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

docker/Dockerfile

+2-6
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,5 @@ RUN pip install -r requirements.txt && \
2020
python setup.py install && \
2121
rm -rf /tmp/build
2222

23-
24-
WORKDIR /astropy/astropy
25-
26-
ENV HOME=/tmp
27-
ENV XDG_CONFIG_HOME=/astropy
28-
ENV XDG_CACHE_HOME=/astropy
23+
# set env
24+
ENV HOME=/tmp

nextflow.config

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,13 @@ profiles {
104104
}
105105
}
106106

107-
108107
if ( host == "garrawarla") ) {
109108
// Set up container
110109
process.module = 'singularity/3.7.4'
111110
singularity {
112111
enabled = true
113112
envWhitelist = 'SINGULARITY_BINDPATH, SINGULARITYENV_LD_LIBRARY_PATH'
113+
runOptions = '--bind $HOME:/$HOME'
114114
}
115115
params.containerDir = '/pawsey/mwa/singularity'
116116

robbie.nf

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ process download_gleam_catalogue {
156156
try:
157157
cat.write(data_load.REF_CAT, format='fits')
158158
os.symlink(data_load.REF_CAT, "GLEAM_ref_cat.fits")
159-
except PermissionError:
159+
except OSError:
160160
# No permission so dump it here
161161
cat.write("GLEAM_ref_cat.fits", format='fits')
162162
"""

0 commit comments

Comments
 (0)