Directory issues when building image from Singularity file
Version of Singularity:
19:18 $ singularity --version 2.4.6-master.g9c6e831
Expected behavior
Build the image
Actual behavior
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Error in tools:::.install_packages() :
current working directory cannot be ascertained
sh: 0: getcwd() failed: No such file or directory
The downloaded source packages are in
'/tmp/RtmpVvreD6/downloaded_packages'
There were 50 or more warnings (use warnings() to see the first 50)
sh: 0: getcwd() failed: No such file or directory
+ Rscript -e source("https://bioconductor.org/biocLite.R"); biocLite("Biobase")
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Installing package into '/usr/local/lib/R/site-library'
(as 'lib' is unspecified)
trying URL 'https://bioconductor.org/packages/3.6/bioc/src/contrib/BiocInstaller_1.28.0.tar.gz'
Content type 'application/x-gzip' length 18624 bytes (18 KB)
==================================================
downloaded 18 KB
sh: 0: getcwd() failed: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
sh: 0: getcwd() failed: No such file or directory
sh: 0: getcwd() failed: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Error in tools:::.install_packages() :
current working directory cannot be ascertained
sh: 0: getcwd() failed: No such file or directory
Steps to reproduce behavior
sudo singularity --debug build sascha-pipeline-1.0.img Singularity
cat Singularity
Bootstrap: docker
From: rocker/r-ver:3.4.3
%post
apt-get update && apt-get install --no-install-recommends --no-upgrade -y \
libcurl4-openssl-dev libxml2-dev liblzma-dev libbz2-dev libz-dev build-essential ca-certificates curl git libncursesw5-dev libncurses5-dev make zlib1g-dev && apt-get clean && rm -rf /var/lib/apt/lists/*
#Setup ENV variables
#ENV BCFTOOLS_BIN="bcftools-1.6.tar.bz2" \
#BCFTOOLS_PLUGINS="/usr/local/libexec/bcftools" \
#BCFTOOLS_VERSION="1.6"
# Install BCFTools
#RUN curl -fsSL https://github.com/samtools/bcftools/releases/download/$BCFTOOLS_VERSION/$BCFTOOLS_BIN -o /opt/$BCFTOOLS_BIN \
curl -fsSL https://github.com/samtools/bcftools/releases/download/1.6/bcftools-1.6.tar.bz2 -o /opt/bcftools-1.6.tar.bz2 \
&&
tar xvjf /opt/bcftools-1.6.tar.bz2 -C /opt/ \
&&
cd /opt/bcftools-1.6 \
&&
make \
&&
make install \
&&
rm -rf /opt/bcftools-1.6.tar.bz2 /opt/bcftools-1.6
Rscript -e 'install.packages("devtools", dependencies = TRUE)'
Rscript -e 'source("https://bioconductor.org/biocLite.R"); biocLite("Biobase")'
Rscript -e 'source("https://bioconductor.org/biocLite.R"); biocLite("BioGenerics")'
Rscript -e 'source("https://bioconductor.org/biocLite.R"); biocLite("BiocInstaller")'
Rscript -e 'source("https://bioconductor.org/biocLite.R"); biocLite("BiocParallel")'
Rscript -e 'source("https://bioconductor.org/biocLite.R"); biocLite("Biostrings")'
Rscript -e 'source("https://bioconductor.org/biocLite.R"); biocLite("BSgenome")'
Rscript -e 'source("https://bioconductor.org/biocLite.R"); biocLite("BSgenome.Hsapiens.UCSC.hg38")'
Rscript -e 'source("https://bioconductor.org/biocLite.R"); biocLite("DelayedArray")'
Rscript -e 'source("https://bioconductor.org/biocLite.R"); biocLite("fastseg")'
%runscript
exec /bin/bash "$@"
This seems to fail even for version 3.1.0. @jmstover what do you think?
Hello,
This is a templated response that is being sent out to all open issues. We are working hard on 'rebuilding' the Singularity community, and a major task on the agenda is finding out what issues are still outstanding.
Please consider the following:
- Is this issue a duplicate, or has it been fixed/implemented since being added?
- Is the issue still relevant to the current state of Singularity's functionality?
- Would you like to continue discussing this issue or feature request?
Thanks, Carter
This seems to fail even for version
3.1.0. @jmstover what do you think?
Still getting this problem ? Have this been solved already ? If yes, what work around have you followed and applied ?
@titansmc We're looking into the issue carefully, soon will bring to community and discuss ways to better solve as well address this. Thankyou for keeping the interest in the subject.
Still an issue when building in singularity 3.8.5. Using a Singularity.def file produced by neurodocker. Failing when executing a script for the software package FSL:
%post
...
bash -c bash -x /opt/fsl-6.0.0/etc/fslconf/fslpython_install.sh -f /opt/fsl-6.0.0
+ bash -c bash -x /opt/fsl-6.0.0/etc/fslconf/fslpython_install.sh -f /opt/fsl-6.0.0
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
This looks much more likely to me to be an issue with neurodocker than Singularity.
Old Singularity repo issues are now closed. If this is still critical please open a new issue in Apptainer repo.