BootStrap: yum
OSVersion: 7
MirrorURL: http://mirror.centos.org/centos-%{OSVERSION}/%{OSVERSION}/os/$basearch/
Include: yum wget
# best to build up container using kickstart mentality.
# ie, to add more packages to image,
# re-run bootstrap command again.
# bootstrap on existing image will build on top of it, not overwriting it/restarting from scratch
# singularity .def file is like kickstart file
# unix commands can be run, but if there is any error, the bootstrap process ends
%setup
# commands to be executed on host outside container during bootstrap
%post
# commands to be executed inside container during bootstrap
yum -y groupinstall "Development Tools"
# # Clone the OpenMPI GitHub master branch in current directory (on host)
git clone https://github.com/open-mpi/ompi.git
cd ompi
# Build OpenMPI in the working directory
./configure --prefix=/usr/local
make
make install
#
# Instal "zlib1g" to aviod installation error
yum -y install zlib-devel
# Install STAR - get STAR source using git
git clone https://github.com/alexdobin/STAR.git
cd STAR/source
echo "Within STAR"
echo "pwd"
# Build STAR
make STAR
echo $PATH
STAR --version
echo "OUT of Star Dir"
STAR --version
/usr/bin/STAR --help
# create bind points for storage. Replace netid as appropriate
mkdir /extra/mnoon /rsgrps/zarnescu/
exit 0
%runscript
# commands to be executed when the container runs
echo "Arguments received: $*"
exec /usr/bin/python "$@"
%test
# commands to be executed within container at close of bootstrap process
python --version
STAR --version
sudo singularity exec -w centosMPI_star.img
git clone https://github.com/alexdobin/STAR.git
cd STAR/source/
singularity exec ../../centosMPI_star.img make STAR
When I do
singularity shell centosMPI_star.img
I can't find STAR in any possible directory other than the clonned version on /home/mnoon
Can you please tell me what am I doing wrong? Also, Where should the installed tool/executable be located with the container?
Regards,
M
git clone -b development https://www.github.com/singularityware/singularity.git
cd singularity
./autogen.sh
./configure --prefix=/usr/local
make
sudo make install
singularity create --size 4000 star.img
sudo singularity bootstrap star.img Singularity
Singularity start.img:/ompi/STAR> ls bin/Linux_x86_64/STAR
bin/Linux_x86_64/STAR
--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singularity+unsubscribe@lbl.gov.
g++ -c -O3 -pipe -Wall -Wextra bam_cat.c
g++ -o STAR -O3 -pipe -std=c++11 -Wall -Wextra -fopenmp -D'COMPILATION_TIME_PLACE="Tue May 9 05:03:20 UTC 2017 :/STAR/source"' SharedMemory.o PackedArray.o SuffixArrayFuns.o STAR.o Parameters.o InOutStreams.o SequenceFuns.o Genome.o Chain.o Stats.o Transcript.o Transcript_alignScore.o ReadAlign.o ReadAlign_storeAligns.o ReadAlign_stitchPieces.o ReadAlign_multMapSelect.o ReadAlign_mapOneRead.o readLoad.o ReadAlignChunk.o ReadAlignChunk_processChunks.o ReadAlignChunk_mapChunk.o OutSJ.o outputSJ.o blocksOverlap.o ThreadControl.o sysRemoveDir.o ReadAlign_maxMappableLength2strands.o binarySearch2.o ReadAlign_outputAlignments.o ReadAlign_outputTranscriptSAM.o ReadAlign_outputTranscriptSJ.o ReadAlign_outputTranscriptCIGARp.o ReadAlign_createExtendWindowsWithAlign.o ReadAlign_assignAlignToWindow.o ReadAlign_oneRead.o ReadAlign_stitchWindowSeeds.o ReadAlign_chimericDetection.o stitchWindowAligns.o extendAlign.o stitchAlignToTranscript.o alignSmithWaterman.o genomeGenerate.o genomeParametersWrite.o genomeScanFastaFiles.o genomeSAindex.o Genome_insertSequences.o insertSeqSA.o funCompareUintAndSuffixes.o sortSuffixesBucket.o funCompareUintAndSuffixesMemcmp.o TimeFunctions.o ErrorWarning.o loadGTF.o streamFuns.o stringSubstituteAll.o Transcriptome.o Transcriptome_quantAlign.o ReadAlign_quantTranscriptome.o Quantifications.o Transcriptome_geneCountsAddAlign.o sjdbLoadFromFiles.o sjdbLoadFromStream.o sjdbPrepare.o sjdbBuildIndex.o sjdbInsertJunctions.o mapThreadsSpawn.o Parameters_openReadsFiles.cpp Parameters_closeReadsFiles.cpp BAMoutput.o BAMfunctions.o ReadAlign_alignBAM.o BAMbinSortByCoordinate.o signalFromBAM.o bamRemoveDuplicates.o BAMbinSortUnmapped.o bam_cat.o GlobalVariables.cpp -pthread -Lhtslib -Bstatic -lhts -Bdynamic -lz -lrt
Parameters_openReadsFiles.cpp: In member function 'void Parameters::openReadsFiles()':
Parameters_openReadsFiles.cpp:30:20: warning: variable 'imate' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]
for (uint imate=0;imate<readNmates;imate++) {//open readIn files
^
+ mkdir - p /extra/mnoon
mkdir: cannot create directory '/extra/mnoon': No such file or directory
ERROR: Aborting with RETVAL=255
--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singularity+unsubscribe@lbl.gov.
sudo singularity bootstrap starMPI.img starMPI.def
[sudo] password for mnoon:
Sanitizing environment
Building from bootstrap definition recipe
Adding base Singularity environment to container
Docker image path: index.docker.io/library/centos:7
Cache folder set to /root/.singularity/docker
Exploding layer: sha256:93857f76ae30d903bbdad13fbf7fad95ce1c0b52b7d5644651e01c6c7a906312.tar.gz
Exploding layer: sha256:9326ff949485e53c2403126b5422ad659cb2176bddbc511461da81c10703a50c.tar.gz
User defined %runscript found! Taking priority.
Running post scriptlet
+ yum -y groupinstall 'Development Tools'
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
* base: repo1.sea.innoscale.net
* extras: centos.firehosted.com
* updates: mirrors.sonic.net
Maybe run: yum groups mark install (see man yum)
No packages in any requested group available to install or update
+ yum -y install zlib-devel
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
* base: repo1.sea.innoscale.net
* extras: centos.firehosted.com
* updates: mirrors.sonic.net
Resolving Dependencies
--> Running transaction check
---> Package zlib-devel.x86_64 0:1.2.7-17.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==============================================================================================================================================================
Package Arch Version Repository Size
==============================================================================================================================================================
Installing:
zlib-devel x86_64 1.2.7-17.el7 base 50 k
Transaction Summary
==============================================================================================================================================================
Install 1 Package
Total download size: 50 k
Installed size: 132 k
Downloading packages:
warning: /var/cache/yum/x86_64/7/base/packages/zlib-devel-1.2.7-17.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Public key for zlib-devel-1.2.7-17.el7.x86_64.rpm is not installed
zlib-devel-1.2.7-17.el7.x86_64.rpm | 50 kB 00:00:00
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Importing GPG key 0xF4A80EB5:
Userid : "CentOS-7 Key (CentOS 7 Official Signing Key) <secu...@centos.org>"
Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
Package : centos-release-7-3.1611.el7.centos.x86_64 (@CentOS)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : zlib-devel-1.2.7-17.el7.x86_64 1/1
Verifying : zlib-devel-1.2.7-17.el7.x86_64 1/1
Installed:
zlib-devel.x86_64 0:1.2.7-17.el7
Complete!
+ cd /
+ git clone https://github.com/alexdobin/STAR.git
fatal: destination path 'STAR' already exists and is not an empty directory.
ERROR: Aborting with RETVAL=255
--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singularity+unsubscribe@lbl.gov.
singularity shell starMPI.img
I cant seem to find , STAR directory on home or path:
Singularity starMPI.img:~> echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
[mnoon@localhost ~]$ sudo singularity bootstrap starMPI.img starMPI.def
Sanitizing environment
Building from bootstrap definition recipe
Adding base Singularity environment to container
Docker image path: index.docker.io/library/centos:7
Cache folder set to /root/.singularity/docker
Exploding layer: sha256:93857f76ae30d903bbdad13fbf7fad95ce1c0b52b7d5644651e01c6c7a906312.tar.gz
Exploding layer: sha256:9326ff949485e53c2403126b5422ad659cb2176bddbc511461da81c10703a50c.tar.gz
User defined %runscript found! Taking priority.
Running post scriptlet
+ yum -y groupinstall 'Development Tools'
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
* base: repo1.sea.innoscale.net
* extras: centos.firehosted.com
* updates: mirrors.sonic.net
Maybe run: yum groups mark install (see man yum)
No packages in any requested group available to install or update
+ git clone https://github.com/open-mpi/ompi.git
fatal: destination path 'ompi' already exists and is not an empty directory.
To unsubscribe from this group and stop receiving emails from it, send an email to singularity...@lbl.gov.
g++ -c -O3 -pipe -Wall -Wextra bam_cat.c
g++ -o STAR -O3 -pipe -std=c++11 -Wall -Wextra -fopenmp -D'COMPILATION_TIME_PLACE="Tue May 9 06:18:22 UTC 2017 :/STAR/source"' SharedMemory.o PackedArray.o SuffixArrayFuns.o STAR.o Parameters.o InOutStreams.o SequenceFuns.o Genome.o Chain.o Stats.o Transcript.o Transcript_alignScore.o ReadAlign.o ReadAlign_storeAligns.o ReadAlign_stitchPieces.o ReadAlign_multMapSelect.o ReadAlign_mapOneRead.o readLoad.o ReadAlignChunk.o ReadAlignChunk_processChunks.o ReadAlignChunk_mapChunk.o OutSJ.o outputSJ.o blocksOverlap.o ThreadControl.o sysRemoveDir.o ReadAlign_maxMappableLength2strands.o binarySearch2.o ReadAlign_outputAlignments.o ReadAlign_outputTranscriptSAM.o ReadAlign_outputTranscriptSJ.o ReadAlign_outputTranscriptCIGARp.o ReadAlign_createExtendWindowsWithAlign.o ReadAlign_assignAlignToWindow.o ReadAlign_oneRead.o ReadAlign_stitchWindowSeeds.o ReadAlign_chimericDetection.o stitchWindowAligns.o extendAlign.o stitchAlignToTranscript.o alignSmithWaterman.o genomeGenerate.o genomeParametersWrite.o genomeScanFastaFiles.o genomeSAindex.o Genome_insertSequences.o insertSeqSA.o funCompareUintAndSuffixes.o sortSuffixesBucket.o funCompareUintAndSuffixesMemcmp.o TimeFunctions.o ErrorWarning.o loadGTF.o streamFuns.o stringSubstituteAll.o Transcriptome.o Transcriptome_quantAlign.o ReadAlign_quantTranscriptome.o Quantifications.o Transcriptome_geneCountsAddAlign.o sjdbLoadFromFiles.o sjdbLoadFromStream.o sjdbPrepare.o sjdbBuildIndex.o sjdbInsertJunctions.o mapThreadsSpawn.o Parameters_openReadsFiles.cpp Parameters_closeReadsFiles.cpp BAMoutput.o BAMfunctions.o ReadAlign_alignBAM.o BAMbinSortByCoordinate.o signalFromBAM.o bamRemoveDuplicates.o BAMbinSortUnmapped.o bam_cat.o GlobalVariables.cpp -pthread -Lhtslib -Bstatic -lhts -Bdynamic -lz -lrt
Parameters_openReadsFiles.cpp: In member function 'void Parameters::openReadsFiles()':
Parameters_openReadsFiles.cpp:30:20: warning: variable 'imate' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]
for (uint imate=0;imate<readNmates;imate++) {//open readIn files
^
+ mkdir -p /extra/mnoon
+ mkdir -p /rsgrps/zarnescu/
Adding environment to container
Adding deffile section labels to container
Running test scriptlet
+ python --version
Python 2.7.5
+ STAR --version
/.test: line 5: STAR: command not found
ERROR: Aborting with RETVAL=255
To unsubscribe from this group and stop receiving emails from it, send an email to singularity...@lbl.gov.
To unsubscribe from this group and stop receiving emails from it, send an email to singularity+unsubscribe@lbl.gov.
echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin/STAR/bin/Linux_x86_64
The problem is that I cant find it here "/bin/STAR/" or any other directory in the path.. I dont understand this behavior.. this is could be something very very trivial that I am missing.
Thanks,
M
# Alternatively, get STAR source using gitgit clone https://github.com/alexdobin/STAR.git cd STAR/source
# Build STAR
make STAR
| Bootstrap:docker | |
| From: centos:7 | |
| %labels | |
| CREATOR vso...@stanford.edu | |
| %environment | |
| PATH=$PATH/STAR/bin/Linux_x86_64 |
| %post | |
| # commands to be executed inside container during bootstrap | |
| yum -y groupinstall "Development Tools" | |
| # Install OpenMPI |
| git clone https://github.com/open-mpi/ompi.git | |
| cd ompi |
| ./autogen.pl | |
| ./configure --prefix=/usr/local | |
| make | |
| make install | |
| # Instal "zlib1g" to aviod installation error | |
| yum -y install zlib-devel | |
| # Install Star | |
| cd / |
| git clone https://github.com/alexdobin/STAR.git | |
| cd STAR/source |
| make STAR | |
| mkdir - p /extra/mnoon | |
| mkdir -p /rsgrps/zarnescu/ | |
| %runscript |
| echo "Arguments received: $*" | |
| exec /usr/bin/python "$@" | |
| %test | |
| python --version | |
| STAR --version |
To unsubscribe from this group and stop receiving emails from it, send an email to singularity+unsubscribe@lbl.gov.
To unsubscribe from this group and stop receiving emails from it, send an email to singularity...@lbl.gov.