wget from inside the container

4,027 views
Skip to first unread message

vesbes

unread,
Mar 18, 2017, 10:14:37 PM3/18/17
to singularity
Dear *,

Just started playing with this container technology ... what I ride!
I'm trying to move from VM's to containers on HPC environment and thus Singularity is a perfect match.
Congrats ladies and gents.

Trying to install software in a container but I'm stuck with a 'wget' cmd. The link works just fine on my build box but when called from inside the container it seems to fail. I also tried containers of different sizes to ensure it was not a space problem, still the same.

Any help to put me on the right track is appreciated.

Cheers,
vb

vagrant@vagrant-ubuntu-trusty-64:~$ sudo singularity create -s 1024 gromacs.img

vagrant@vagrant-ubuntu-trusty-64:~$ sudo singularity bootstrap gromacs.img gromacs.def
Cache folder set to /home/vagrant/.singularity/docker
... snip ...
Running hooks in /etc/ca-certificates/update.d...
done.
WARNING: Something may have gone wrong. %post script exited with non-zero status.

vagrant@vagrant-ubuntu-trusty-64:~$ singularity exec gromacs.img df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/loop0      976M  392M  534M  43% /
/dev/sda1        40G  3.4G   35G   9% /tmp
tmpfs            49M  356K   49M   1% /etc/resolv.conf
udev            241M   12K  241M   1% /dev


Bootstrap: docker
From: ubuntu:latest
 
%setup
    # commands to be executed on host outside container during bootstrap
 
%post
    # commands to be executed inside container during bootstrap Pre-requisites installs
    apt-get -y update
    apt-get -y install build-essential wget cmake

    # Download and uncompress gmx
 
%runscript
    # commands to be executed when the container runs
 
%test
    # commands to be executed within container at close of bootstrap process



tin h

unread,
Mar 18, 2017, 10:59:39 PM3/18/17
to singu...@lbl.gov
Vesbes, 

You can indeed install wget and have it run inside your container like the way you have specified.  I have done so to install anaconda and it worked for me.

From your error, it seems to complain that wget is not installed in your container, but you have specified to do so.

The interesting part is I would expect the error to be "wget: command not found".
But in your output it included the URL as well.   Could there be some non-print character between your wget and the http, thus confusing the system as it treated it as one long convoluted command?


Other than that, I have tended to use "--force-yes" option in apt-get.  Perhaps that may help you as well.

Good luck!
Tin


--
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.

vanessa s

unread,
Mar 19, 2017, 1:14:15 PM3/19/17
to singu...@lbl.gov
Hey vesbes! I think this might be related to running in Vagrant. Could you re-run the bootstrap and add --debug to give the full output?

sudo singularity --debug bootstrap gromacs.img gromacs.def

To unsubscribe from this group and stop receiving emails from it, send an email to singularity...@lbl.gov.

--
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.



--
Vanessa Villamia Sochat
Stanford University '16

vesbes

unread,
Mar 20, 2017, 3:30:19 AM3/20/17
to singularity
Hi Tin, Vanessa

Thanks for the prompt reply.
The issue was a hidden character in the wget command (probably introduced when I did copy/past of that specific cmd line).

Just great.
Cheers,
N.

vanessa s

unread,
Mar 20, 2017, 3:33:44 AM3/20/17
to singu...@lbl.gov
Awesome! Glad you caught it. Never can know what's hiding in copy pastes these days... or excel cells for that matter.

--
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.
Reply all
Reply to author
Forward
0 new messages