ReproNim / ohbm2018-training

http://www.reproducibleimaging.org/ohbm2018-training
3 stars 8 forks source link

Virtualbox requirements #12

Closed satra closed 6 years ago

satra commented 6 years ago

@mjtravers @yarikoptic - add as necessary

wonder if the following should be installed or done through containers as well

mjtravers commented 6 years ago

Here is the image: https://training.repronim.org/repronim-training.ova (it's ~2GB in size)

The password is same as the username: vagrant

Installed:

satra commented 6 years ago

@mjtravers - a few observations:

satra commented 6 years ago

@yarikoptic - can you try the vm? i can't build with singularity installed from neurodebian either. i get a "implausibly old timestamp" error.

satra commented 6 years ago

actually the more pertinent error is: "ERROR: 'Bootstrap' type not supported: docker"

djarecka commented 6 years ago

@satra - I tested quickly docker within the vm, and it works fine. I also had no problem with saving files to a mounted directory

satra commented 6 years ago

@djarecka - the error comes from singularity - not docker.

satra commented 6 years ago

does docker save the files with the right permissions?

djarecka commented 6 years ago

yes, i was just referring to our discussion earlier today

djarecka commented 6 years ago

@satra - ok, i see what you mean... no, the permission is not correct, can work on docker groups tomorrow

mjtravers commented 6 years ago

I am unable to reproduce the singularity error. I am running these build commands taken from the singularity docs page:

singularity build hello-world.simg shub://vsoch/hello-world
singularity build lolcow.simg docker://godlovedc/lolcow

What's the singularity build command being run that is failing with errors?

However, I am getting errors when building a Docker image, though. I cleaned up the packer script I am using for the build and have an updated the image that runs Docker build cleanly for me:

https://training.repronim.org/repronim-training.ova

satra commented 6 years ago

@mjtravers - building from a pre-built image works but not when bootstrapping from docker:

try a Singularity bootstrap file:

Bootstrap: docker
From: busybox

and do sudo singularity build test.img Singularity

mjtravers commented 6 years ago

I'll take a look. BTW: The new ova file I uploaded this morning has a NeuroDebian apt source setup.

satra commented 6 years ago

thanks - downloading now

mjtravers commented 6 years ago

Could it be simply an issue of bootstrapping being depreciated?

https://singularity.lbl.gov/docs-bootstrap

satra commented 6 years ago

yes, but you can bootstrap using build now. they just converged a single image building command.

satra commented 6 years ago

worst case, i will compile from source and put some debug statements before the error is generated.

mjtravers commented 6 years ago

Ah, I see... digging through docs now

mjtravers commented 6 years ago

The new ova file may work for you. I was able to build using your instructions above.

satra commented 6 years ago

importing now.

mjtravers commented 6 years ago

(crossing fingers)

satra commented 6 years ago

no go:

image

mjtravers commented 6 years ago

Weirdly, I am not getting the error screenshot from 2018-05-30 15-10-56

djarecka commented 6 years ago

@satra - it works for me, have a similar output as @mjtravers

screen shot 2018-05-30 at 11 49 56
mjtravers commented 6 years ago

I am running the VM in VirtualBox 5.2.12 on an Ubuntu 16.04 machine.

djarecka commented 6 years ago

I updated my VB yesterday: 5.2.12 r122591 (Qt5.6.3) on OSX (10.12.1)

yarikoptic commented 6 years ago

casting my vote: works for me (proof: http://www.onerussian.com/tmp/gkrellShoot_05-30-18_120709.png)

satra commented 6 years ago

did anyone mount an outside folder using shared folders?

djarecka commented 6 years ago

@satra i didn't

mjtravers commented 6 years ago

@satra did not

satra commented 6 years ago

so it didn't have to do with shared folders, but changing the number of cores for the machine.

image

can someone verify if you can change the number of cores and still build?

djarecka commented 6 years ago

it works when I changed CPU

dnkennedy commented 6 years ago

For what it's worth, I have @satra 's error from above...

satra commented 6 years ago

@dnkennedy:

that worked for now.

i did try to debug the error i was having and the pointers were all the direction of some form of memory corruption. examples of weird string substitution happening in the shell: https://www.dropbox.com/s/7p2ygcyg77xy96t/Screenshot%202018-05-30%2017.53.11.png?dl=0 https://www.dropbox.com/s/2b7jp236k6xfak1/Screenshot%202018-05-30%2017.47.21.png?dl=0 https://www.dropbox.com/s/eoyjlywaw3q7011/Screenshot%202018-05-30%2017.39.22.png?dl=0

satra commented 6 years ago

@mjtravers, @dnkennedy - i cannot seem to copy and paste from my host into virtualbox and vice versa. i haven't used virtualbox in a while, any ideas?

mjtravers commented 6 years ago

@satra Normally, selecting "Devices -> Shared clipboard -> bidirectional" from the VirtualBox menu does the trick but I think the VBoxGuestAdditions is not installed properly. Let me tinker and get back to you.

dnkennedy commented 6 years ago

I was just going to ask the same thing about cut and paste. I know it did work on the Savoy Course VM...

mjtravers commented 6 years ago

@satra @dnkennedy There is a new VM image up on the training website:

https://training.repronim.org/repronim-training.ova

To get the VirtualBox Guest Additions working, I needed to make some significant changes to how the baseline Ubuntu 16.04 desktop image is built. Here are the resulting changes to the VM:

I set the default memory size to 2048MB. Is that enough? I was pondering setting it to 4096MB but then thought it best to keep it low as possible and let users increase if desired.

dnkennedy commented 6 years ago

Yay: the Singularity example and the copy & paste work for me!!! thanks, @mjtravers

djarecka commented 6 years ago

@mjtravers - Singularity and copy&paste works for me too, thank you! It's a bit funny to have 2 types of copy&paste (OSX and Linux) on one laptop, but will get used to :)

satra commented 6 years ago

@mjtravers - unfortunately i am still getting the darn error!

mjtravers commented 6 years ago

@satra The copy&paste error or the Singularity error?

satra commented 6 years ago

singularity error - my old tricks didn't work - i'll try one more thing.

satra commented 6 years ago

@mjtravers - my latest solution.

1. stop docker
2. import ova
3. sleep
4. test singularity build first before doing anything else
satra commented 6 years ago

well that was short lived!! i again cannot create the image! quite fed up right now!

mjtravers commented 6 years ago

@satra For web-based, I will look into creating an AWS image that trainees can use. It will mean the trainee will need access to an AWS subscription that will pay for the EC2 time used. Did you have another web-based solution in mind?

Also, so as not to duplicate work, I am installing Miniconda in the VM to set up the requirements.txt package list JB sent on Friday.

satra commented 6 years ago

@mjtravers - if you install python-virtualenv and python-pip at the system level i think we can use that to create JB's environment - that will reduce the size a little bit.

miniconda will pull in too many things.

satra commented 6 years ago

@mjtravers - regarding the web-based - ec2 is fine. we would support it via repronim. (@dnkennedy).

djarecka commented 6 years ago

I've just realized that when I'm running VM, my local Docker is crashing, could be related to the issue reported by @satra

mjtravers commented 6 years ago

@satra @jbpoline JB's requirements.txt file has versions attached to the packages which are putting some constraints on the install, which is why I started working with Miniconda. For example, ipython 6.1.0 requires python >= 3.3. Virtualenv (from what I can tell so far, not very familiar with it) will need the additional python version installed in the VM system outside venv and alongside the existing python 2.7. Miniconda handles additional python versions within the conda environments themselves which is a lot easier to manage and does not require the system installation of new python versions. The Miniconda baseline footprint doesn't appear to be very large. Are you thinking of the full Anaconda environment? Here are the baseline packages installed by Miniconda for a new environment:

Another way to approach the problem is: JB, how attached are you to the versions specified in your requirements.txt file? Could we simply pull all the versions that work with Python 2.7?

satra commented 6 years ago

@mjtravers - in that case just use miniconda.