git won't install through command in recipe file

135 views
Skip to first unread message

Rutu Pandya

unread,
Mar 15, 2019, 12:15:09 PM3/15/19
to singularity
Hello,

I am building a container using a recipe file. And want to install git to be able to clone a repo from it into the container. Even after trying several fixes and an exhaustive search for the correct command, I am unable to install git. The server I have is Ubuntu 16.04. 

Attached is the recipe file for reference. 

Thanks in advance!
Rutu
new_recipe.txt

v

unread,
Mar 15, 2019, 1:24:13 PM3/15/19
to singu...@lbl.gov
Yeah that is weird - maybe the server is down? In the meantime, I found a base that has git already installed, if it helps.

Bootstrap:docker
From:tensorflow/tensorflow:devel-gpu-py3

# sudo singularity build container.sif Singularity

%environment
    export SHELL=/bin/bash
%post
  
  mkdir -p /software
  cd /software
  git clone https://github.com/cerr/CERR.git
  git clone https://github.com/cerr/aimodels.git

If it doesn't resolve, you can try installing from source

--
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...@lbl.gov.


--
Vanessa Villamia Sochat
Stanford University '16

Rutu Pandya

unread,
Mar 15, 2019, 1:41:50 PM3/15/19
to singularity
This is great, would you happen to know what version of Tensorflow this might be? I need it to be 1.12.0..

Thanks again for your help Vanessa! 

v

unread,
Mar 15, 2019, 2:14:16 PM3/15/19
to singu...@lbl.gov
I'm not sure - I'd guess it's the latest in development (1.13.1 something) so you could try installing the version you need:

pip install tensorflow==1.12.0

Rutu Pandya

unread,
Mar 15, 2019, 2:27:24 PM3/15/19
to singularity
The install from the source did not work as well, error attached.

Will try bootsrapping from the one you suggested and reinstall tensorflow version 1.12.

Thanks!
Rutu
Capture.JPG

v

unread,
Mar 15, 2019, 2:32:42 PM3/15/19
to singu...@lbl.gov
I ran the container with Docker (the devel-gpu-py3, not the one that you originally used, which didn't have git) and used pip to install. Good luck!

Rutu Pandya

unread,
Mar 15, 2019, 2:34:23 PM3/15/19
to singularity
Great thanks so much!

Stephen Hauskins

unread,
Mar 15, 2019, 3:14:14 PM3/15/19
to singu...@lbl.gov
Rutu

It looks like you are pointing at a non-existent repository or mirror for the software.  The error reports that the files are not at
the URL you are pointing at.

I am not a ubuntu person but rather centos but you should be able to point at another ubuntu repository site.


Kandes, Martin

unread,
Mar 18, 2019, 2:24:56 PM3/18/19
to singu...@lbl.gov

Rutu,


In case you're still having problems, here is our base TensorFlow definition file [1].


Marty


[1]


https://github.com/mkandes/naked-singularity/blob/master/definition-files/comet/tensorflow/tensorflow-gpu.def


From: 'Stephen Hauskins' via singularity <singu...@lbl.gov>
Sent: Friday, March 15, 2019 12:13:32 PM
To: singu...@lbl.gov
Subject: Re: [Singularity] git won't install through command in recipe file
 

Rutu Pandya

unread,
Mar 20, 2019, 10:08:45 AM3/20/19
to singularity, mka...@sdsc.edu
Thank you Stephen, Kandes!

Rutu Pandya

unread,
Apr 2, 2019, 3:03:01 PM4/2/19
to singularity, mka...@sdsc.edu
Hi Vanessa,

Would you happen to know of a container having cuda and tensorflow both installed? 

Thanks,
Rutu

v

unread,
Apr 2, 2019, 3:06:57 PM4/2/19
to singu...@lbl.gov
Not a specific one, but if you search for the label that is the cuda version, there are a ton!


A control F finds 30 with tensorflow, so maybe one of those guys will be good :)

Kandes, Martin

unread,
Apr 2, 2019, 3:25:50 PM4/2/19
to singu...@lbl.gov

Rutu,


And as I mentioned previously, if you need to build a custom container for your work, have a look at our definition file [1]. We build TensorFlow with GPU support from source for both python2 and python3. 


Marty


[1]


https://github.com/mkandes/naked-singularity/blob/master/definition-files/comet/tensorflow/tensorflow-gpu.def


From: v <vso...@gmail.com>
Sent: Tuesday, April 2, 2019 12:06:30 PM

Rutu Pandya

unread,
Apr 3, 2019, 10:06:09 AM4/3/19
to singularity, mka...@sdsc.edu
Hi Marty, I actually tried that first - but in the process a dialogue box comes that requires me to click/select "OK", but they keyes on my keyboard are not mapped to the display it seems and I am not able to proceed from here.

I tried a few other recipes as well from Singularity Hub, haven't yet been able to successfully build a container that has Tensorflow 1.12.0, cuda 9 and cudnn 7 and has also has git. :(

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


--
Vanessa Villamia Sochat
Stanford University '16

--
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 singu...@lbl.gov.

Kandes, Martin

unread,
Apr 3, 2019, 1:13:21 PM4/3/19
to Rutu Pandya, singularity

Rutu,


There shouldn't be any dialog box that pops up when building the container from the definition file. Are you using a Linux virtual machine (e.g., running on Virtual Box) to use Singularity? Maybe you can send us some screenshots showing the issue?


Marty


From: Rutu Pandya <rut...@gmail.com>
Sent: Wednesday, April 3, 2019 7:06:09 AM
To: singularity
Cc: Kandes, Martin

Rutu Pandya

unread,
Apr 3, 2019, 2:19:39 PM4/3/19
to singularity, rut...@gmail.com, mka...@sdsc.edu
Hi Marty,

Yes I am using Vagrant. Attached is the screen. I can't tab or use up and down arrow keyes or anything else to get to OK to continue the process.

Thanks,
Rutu
Capture.JPG

Nadas, Stephen

unread,
Apr 3, 2019, 5:07:15 PM4/3/19
to singu...@lbl.gov, rut...@gmail.com, mka...@sdsc.edu
Hi Rutu,

I) I saw this and it seems to reproduce (the "bad repo" stuff). I started from

Bootstrap: docker
From: tensorflow/tensorflow:1.12.0-gpu-py3

And then apt-get install git or git-core and got errors

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/o/openssh/openssh-client_7.2p2-4ubuntu2.5_amd64.deb 404 Not Found [IP: 91.189.88.152 80]

Have a look at https://stackoverflow.com/questions/30316812/ubuntu-apt-get-unable-to-fetch-packages

Consider the suggestion to add the google nameservers (8.8.8.8/8.8.4.4) to /etc/resolve.conf which fixed installing git for me, without editing the urls in sources.list


II) you may want an " export DEBIAN_FRONTEND=noninteractive" in the post section to try to pass the pop up menus if you want to go on with building. You could consider setting up locale info early in %post section


III) if you want interactive you can consider building a --sandbox, stopping at a good point, and then sudo singularity shell --writable into the sandbox to continue in a shell

Ymmv, hth,

Steve


From: Rutu Pandya <rut...@gmail.com>
Sent: Wednesday, April 3, 2019 2:20 PM
To: singularity <singu...@lbl.gov>
Cc: rut...@gmail.com; mka...@sdsc.edu
Subject: Re: [Singularity] git won't install through command in recipe file

Hi Marty,

Yes I am using Vagrant. Attached is the screen. I can't tab or use up and down arrow keyes or anything else to get to OK to continue the process.

Thanks,
Rutu

On Wednesday, April 3, 2019 at 1:13:21 PM UTC-4, Kandes, Martin wrote:
Rutu,

There shouldn't be any dialog box that pops up when building the container from the definition file. Are you using a Linux virtual machine (e.g., running on Virtual Box) to use Singularity? Maybe you can send us some screenshots showing the issue?

Marty
________________________________________
From: Rutu Pandya <javascript:>
Sent: Wednesday, April 3, 2019 7:06:09 AM
To: singularity
Cc: Kandes, Martin
Subject: Re: [Singularity] git won't install through command in recipe file
 
Hi Marty, I actually tried that first - but in the process a dialogue box comes that requires me to click/select "OK", but they keyes on my keyboard are not mapped to the display it seems and I am not able to proceed from here.

I tried a few other recipes as well from Singularity Hub, haven't yet been able to successfully build a container that has Tensorflow 1.12.0, cuda 9 and cudnn 7 and has also has git. :(

Thanks,
Rutu 

On Tuesday, April 2, 2019 at 3:25:50 PM UTC-4, Kandes, Martin wrote:
Rutu,

And as I mentioned previously, if you need to build a custom container for your work, have a look at our definition file [1]. We build TensorFlow with GPU support from source for both python2 and python3. 

Marty

[1]

https://github.com/mkandes/naked-singularity/blob/master/definition-files/comet/tensorflow/tensorflow-gpu.def
________________________________________
From: v <mailto:vso...@gmail.com>
Sent: Tuesday, April 2, 2019 12:06:30 PM
To: mailto:singu...@lbl.gov
Subject: Re: [Singularity] git won't install through command in recipe file
 
Not a specific one, but if you search for the label that is the cuda version, there are a ton!

https://singularity-hub.org/labels/com.nvidia.cuda.version

A control F finds 30 with tensorflow, so maybe one of those guys will be good :)

On Tue, Apr 2, 2019 at 3:03 PM Rutu Pandya <mailto:rut...@gmail.com> wrote:
Hi Vanessa,

Would you happen to know of a container having cuda and tensorflow both installed? 

Thanks,
Rutu


On Wednesday, March 20, 2019 at 10:08:45 AM UTC-4, Rutu Pandya wrote:
Thank you Stephen, Kandes!

On Monday, March 18, 2019 at 2:24:56 PM UTC-4, Kandes, Martin wrote:
Rutu,

In case you're still having problems, here is our base TensorFlow definition file [1].

Marty

[1]

https://github.com/mkandes/naked-singularity/blob/master/definition-files/comet/tensorflow/tensorflow-gpu.def
________________________________________
From: 'Stephen Hauskins' via singularity <mailto:singu...@lbl.gov>
Sent: Friday, March 15, 2019 12:13:32 PM
To: mailto:singu...@lbl.gov
Subject: Re: [Singularity] git won't install through command in recipe file
 
Rutu

It looks like you are pointing at a non-existent repository or mirror for the software.  The error reports that the files are not at
the URL you are pointing at.

I am not a ubuntu person but rather centos but you should be able to point at another ubuntu repository site.



On Fri, Mar 15, 2019 at 11:27 AM Rutu Pandya <mailto:rut...@gmail.com> wrote:
The install from the source did not work as well, error attached.

Will try bootsrapping from the one you suggested and reinstall tensorflow version 1.12.

Thanks!
Rutu



On Friday, March 15, 2019 at 2:14:16 PM UTC-4, vanessa wrote:
I'm not sure - I'd guess it's the latest in development (1.13.1 something) so you could try installing the version you need:

pip install tensorflow==1.12.0

On Fri, Mar 15, 2019 at 1:43 PM Rutu Pandya <mailto:rut...@gmail.com> wrote:
This is great, would you happen to know what version of Tensorflow this might be? I need it to be 1.12.0..

Thanks again for your help Vanessa! 

On Friday, March 15, 2019 at 1:24:13 PM UTC-4, vanessa wrote:
Yeah that is weird - maybe the server is down? In the meantime, I found a base that has git already installed, if it helps.

Bootstrap:docker
From:tensorflow/tensorflow:devel-gpu-py3

# sudo singularity build container.sif Singularity

%environment
    export SHELL=/bin/bash
%post
  
  mkdir -p /software
  cd /software
  git clone https://github.com/cerr/CERR.git
  git clone https://github.com/cerr/aimodels.git

If it doesn't resolve, you can try https://www.digitalocean.com/community/tutorials/how-to-install-git-on-ubuntu-16-04

On Fri, Mar 15, 2019 at 12:15 PM Rutu Pandya <mailto:rut...@gmail.com> wrote:
Hello,

I am building a container using a recipe file. And want to install git to be able to clone a repo from it into the container. Even after trying several fixes and an exhaustive search for the correct command, I am unable to install git. The server I have is Ubuntu 16.04. 

Attached is the recipe file for reference. 

Thanks in advance!
Rutu
--
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 mailto:singularity...@lbl.gov.



--
Vanessa Villamia Sochat
Stanford University '16
(603) 321-0676
--
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 mailto:singularity...@lbl.gov.



--
Vanessa Villamia Sochat
Stanford University '16
(603) 321-0676
--
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 mailto:singularity...@lbl.gov.


--


https://its.pbsci.ucsc.edu

https://www.hb.ucsc.edu

Stephen Hauskins

831-334-3961
--
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 mailto: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 mailto:singu...@lbl.gov.



--
Vanessa Villamia Sochat
Stanford University '16
(603) 321-0676
--
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 mailto:singu...@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 mailto:singularity...@lbl.gov.

v

unread,
Apr 3, 2019, 5:47:10 PM4/3/19
to singu...@lbl.gov
Interesting, so this is definitely something to do with the Singularity build process - you can actually use the same base (from Docker) and not run into any of these issues. Here is a starter Dockerfile:

FROM tensorflow/tensorflow:1.12.0-gpu-py3
ENV SHELL /bin/bash
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y git
RUN mkdir -p /software && \
    cd /software && \
    git clone https://github.com/cerr/CERR.git && \
    git clone https://github.com/cerr/aimodels.git

You can (after your modifications) test this, push to docker hub, and then just pull back into Singularity. It's not a direct Singularity recipe, but hey, it gets the job done.

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

Kandes, Martin

unread,
Apr 3, 2019, 6:15:37 PM4/3/19
to singu...@lbl.gov

Rutu,


I'm not too familiar with Vagrant myself. My guess is there is some hot keys you have to hold down to connect keyboard/mouse interaction to the Vagrant-based VM screen. At least, that's how it works in VirtualBox. Are you using VirtualBox with Vagrant?


Marty


From: v <vso...@gmail.com>
Sent: Wednesday, April 3, 2019 2:46:47 PM
To: singu...@lbl.gov

Rutu Pandya

unread,
Apr 4, 2019, 11:41:03 AM4/4/19
to singularity, rut...@gmail.com, mka...@sdsc.edu
This is very helpful Stephen! Thank you so much, I will give this a shot.
To unsubscribe from this group and stop receiving emails from it, send an email to mailto:singularity+unsub...@lbl.gov.

Rutu Pandya

unread,
Apr 4, 2019, 11:41:27 AM4/4/19
to singularity
Thanks Vanessa I am going to try this now.
To unsubscribe from this group and stop receiving emails from it, send an email to mailto:singularity+unsub...@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 singu...@lbl.gov.

Rutu Pandya

unread,
Apr 9, 2019, 3:25:40 PM4/9/19
to singularity
Update: The best way turned out to be using the following:

Bootstrap: docker
From: nvidia/cuda:9.0-cudnn7-devel-ubuntu16.04

Then installing python3.5, python virtualenv, tensorflow  and the dependencies. 

Thank you all for your help!

Rutu

v

unread,
Apr 9, 2019, 3:44:49 PM4/9/19
to singu...@lbl.gov
Awesome!! :D

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


--
Vanessa Villamia Sochat
Stanford University '16

--
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...@lbl.gov.

Rutu Pandya

unread,
Apr 24, 2019, 7:55:26 AM4/24/19
to singularity
Hi Everyone,

I come across the following error which seems to suggest that the CUDA installation in the container doesn't seem to be working. But I am unable to figure out what must be wrong with it..

Attached is the error and my recipe file - bootstrapping from nvidia/cuda:9.0-cudnn7-devel-ubuntu16.04 docker container.

Does anything stand out? Would really appreciate your help as always!

Thanks,
Rutu
Awesome!! :D

Rutu
To unsubscribe from this group and stop receiving emails from it, send an email to mailto:singularity+unsub...@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 singu...@lbl.gov.


--
Vanessa Villamia Sochat
Stanford University '16

--
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 singu...@lbl.gov.
Capture.PNG
recipe.txt

Rutu Pandya

unread,
Apr 24, 2019, 8:29:47 AM4/24/19
to singularity
Some more information:

The program should be using GPU, but it doesn't in this case I think. 
The HPC cluster I run the container on has CUDA installed. If I load cuda from there and run the container, it works fine.
 
But I was hoping to encapsulate cuda installation within the container and not load it from the HPC. But that doesn't seem to be working. 

Rutu Pandya

unread,
Apr 24, 2019, 10:54:06 AM4/24/19
to singularity
One more update,

 NVIDIA-SMI doesn't work, it can't find the driver. 

failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected

After bootrapping from the nvidia cuda docker container, what else could my recipe file be missing?

Thanks,
Rutu
Capture.PNG

v

unread,
Apr 24, 2019, 11:03:13 AM4/24/19
to singu...@lbl.gov
What is the error? The first bit about the CPU supporting instructions that the binary can't use is just a warning I think. After that it shows finding the GPU. Could you be more specific about what the error is that you are seeing?

Awesome!! :D

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


--
Vanessa Villamia Sochat
Stanford University '16

--
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 singu...@lbl.gov.


--
Vanessa Villamia Sochat
Stanford University '16

--
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...@lbl.gov.

v

unread,
Apr 24, 2019, 11:05:21 AM4/24/19
to singu...@lbl.gov
For the second bit - you are running the container with --nv flags correct? Others can comment if nvidia-smi is still a working thing (I don't know).

Rutu Pandya

unread,
Apr 24, 2019, 11:51:45 AM4/24/19
to singularity
Yes,

I am running it with --nv flag. The error is:

2019-04-24 11:47:44.607319: E tensorflow/stream_executor/cuda/cuda_driver.cc:300] failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected

2019-04-24 11:47:44.607353: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:150] kernel driver does not appear to be running on this host (plvimphctrl1): /proc/driver/nvidia/version does not exist

This is the base recipe file i used, and to it I added a few more dependencies and code needed for my program to run. (Attached my recipe file in previous message)
Awesome!! :D

Rutu
To unsubscribe from this group and stop receiving emails from it, send an email to mailto:singularity+unsub...@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 singu...@lbl.gov.


--
Vanessa Villamia Sochat
Stanford University '16

--
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 singu...@lbl.gov.


--
Vanessa Villamia Sochat
Stanford University '16

--
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 singu...@lbl.gov.


--
Vanessa Villamia Sochat
Stanford University '16


--

Rutu Pandya

unread,
Apr 24, 2019, 1:52:07 PM4/24/19
to singularity
is there a different way to do have cuda9 and cudnn7 inside the container?

Kandes, Martin

unread,
Apr 24, 2019, 1:56:58 PM4/24/19
to singularity

From: Rutu Pandya <rut...@gmail.com>
Sent: Wednesday, April 24, 2019 10:52:07 AM
To: singularity
To unsubscribe from this group and stop receiving emails from it, send an email to singularity...@lbl.gov.

Rutu Pandya

unread,
Apr 24, 2019, 2:40:07 PM4/24/19
to singularity, mka...@sdsc.edu
Hi Martin,

This would be the perfect solution, but I don't know how to get past the package configuration screen - I am unable to select "OK". Tab doesn't work, nd up and down arrow keyes type "[[^A"  on the screen. 

I checked that the VirtualBox has the host key set as right ctrl key. I used the tab and arrow keyes with holding down the right ctrl key but none of this works. 

Anything else I could try?

Attached is the screen that comes up - that I can't get past..

Thanks,
Rutu
Capture.PNG

Kandes, Martin

unread,
Apr 24, 2019, 2:45:50 PM4/24/19
to Rutu Pandya, singularity

Rutu,


Are you trying to setup this virtual machine on Windows or Mac?


Marty


From: Rutu Pandya <rut...@gmail.com>
Sent: Wednesday, April 24, 2019 11:40:06 AM

To: singularity
Cc: Kandes, Martin
Subject: Re: [Singularity] git won't install through command in recipe file
 
Hi Martin,

Rutu Pandya

unread,
Apr 24, 2019, 3:00:33 PM4/24/19
to singularity, rut...@gmail.com, mka...@sdsc.edu
I am using Windows, and also have virtualization enabled on the system.

Kandes, Martin

unread,
Apr 24, 2019, 3:09:48 PM4/24/19
to Rutu Pandya, singularity

Rutu,


Have you tried using only VirtualBox (without Vagrant)? Sorry, I haven't used Vagrant before ... just trying to eliminate any other possible complicating factors.


Marty


From: Rutu Pandya <rut...@gmail.com>
Sent: Wednesday, April 24, 2019 12:00:33 PM
To: singularity
Cc: rut...@gmail.com; Kandes, Martin

Subject: Re: [Singularity] git won't install through command in recipe file

Rutu Pandya

unread,
Apr 24, 2019, 3:18:07 PM4/24/19
to singularity, rut...@gmail.com, mka...@sdsc.edu
I haven't tried that... I would have to see how to set it up. 

Kandes, Martin

unread,
Apr 24, 2019, 3:21:07 PM4/24/19
to Rutu Pandya, singularity

Rutu,


Try: https://www.lifewire.com/install-ubuntu-linux-windows-10-steps-2202108


I know these instructions have worked for some of my students with Windows machines in the past.


Marty


From: Rutu Pandya <rut...@gmail.com>
Sent: Wednesday, April 24, 2019 12:18:07 PM
Reply all
Reply to author
Forward
0 new messages