Hi,
One argument for docker images (next to speed): they can be
automatically generated when a git repository gets a new commit.
With proper commiting policy (e.g. developments in branches, master
branch is always the latest recommended version),
this could work quite well.
However, if the development is distributed in several git
repositories, then this workflow does not work properly.
What you can do is this: create a git repository for your docker
recipe, and manually trigger image building, when it is necessary.
I highly recommend a unified script, where both the VM and the docker
code compilation is made from the same script.
(Or two scripts: setting up the bare minimum VM/Docker environment,
and a unified for the git checkout, compilation, etc.)
(I also recommend the same base operating system for the VM and for
the docker image, e.g. Ubuntu LTS or Fedora, etc.)
Update script(s), etc.: in my opinion, it is best to keep it in a
version control system (git), and updating it is just a git update.
The actual update could be just a shell alias, e.g.
alias update="git checkout repository && repository/update_vm.sh "
or
alias update="sudo apt-get update && sudo apt-get dist-upgrade && git
checkout repository && repository/update_vm.sh "
I would add a shell message, like at the end of the .bashrc (.zshrc, whatever):
echo "To update this image/VM/... please use this command: update"
In my opinion, the initial setup is one of the most important barrier
for the end users, and it takes the most time
as "customer support". So in the beginning of the development it might
be a bit complicated to get the most streamlined workflow,
but on longer term it is worth the effort.
Best,
David
On Fri, Dec 9, 2016 at 8:18 AM, Thielemans, Kris <[log in to unmask]> wrote:
>
>
> Hi Christoph
>
>
>
> I’ve just downloaded the VM again and started from scratch. ‘update_VM.sh’
> worked for me, as suggested by Evgueni. You probably got confused by the
> scripts in the home directory, which shouldn’t have been there.
>
>
>
> Kris
>
>
>
> PS: the reason for the 2 scripts is that update_VM.sh get a new version of
> UPDATE.sh, which actually does the work. This way, we can modify UPDATE.sh
> as necessary after people have downloaded the VM.
>
>
>
> PS: first time, update_VM.sh will take a long time now, as it needs to get
> and build updates to Gadgetron and STIR. Next time it should be faster
> again.
>
> From: CCP-PETMR Developers list [mailto:[log in to unmask]] On
> Behalf Of Evgueni Ovtchinnikov
> Sent: 08 December 2016 12:54
>
>
> To: [log in to unmask]
> Subject: Re: CCPPETMR_VM
>
>
>
> The shell script update_VM.sh is in /usr/local/bin, which is in VM path
> (type echo $PATH to see it).
>
>
>
> So, no matter in which folder you type ‘update_VM.sh’, it should work.
>
>
>
> If it does not, please send me the outputs that you get when you type ‘echo
> $PATH’ and ‘update_VM.sh’.
>
>
>
> From: CCP-PETMR Developers list [mailto:[log in to unmask]] On
> Behalf Of Christoph Kolbitsch
> Sent: 08 December 2016 12:41
> To: [log in to unmask]
> Subject: Re: CCPPETMR_VM
>
>
>
> Could you please update the instructions for the CCPETMR_VM on the github
> site which one needs to be used and in what order? The instructions say:
>
> 4. Double-click on the LXTerminal icon to open a terminal. Type
>
> update_VM.sh
>
> but this does not work because the LXTerminal opens where UPDATE.sh is
> located and not update_VM.sh.
>
>
> --
> Dr. Christoph Kolbitsch
> Medical Physics and Metrological Information Technologies
> Physikalisch-Technische Bundesanstalt
> Abbestr. 2-12
> 10587 Berlin, Germany
> phone: +49 30 3481 7761
>
>
>
> Von: Evgueni Ovtchinnikov <[log in to unmask]>
> An: [log in to unmask]
> Datum: 08.12.2016 13:08
> Betreff: Re: CCPPETMR_VM
> Gesendet von: CCP-PETMR Developers list
> <[log in to unmask]>
>
> ________________________________
>
>
>
>
> No, update_VM.sh is not the same as UPDATE.sh (you can see for yourself –
> see /usr/local/bin/update_VM.sh).
>
> From: CCP-PETMR Developers list [mailto:[log in to unmask]] On
> Behalf Of Christoph Kolbitsch
> Sent: 07 December 2016 20:39
> To: [log in to unmask]
> Subject: CCPPETMR_VM
>
> Hello,
>
>
> I downloaded the VM from http://www.ccppetmr.ac.uk/downloads and I ran the
> "UPDATE.sh" script. (In the manual it is refered to "update_VM.sh and it had
> to be made executable at first use).
>
> I received the following error during "Updating your STIR installation":
>
> create mode 100644 src/recon_test/recontest.cxx
> create mode 100644 src/scatter_buildblock/CreateTailMaskFromACFs.cxx
> create mode 100644 src/test/test_export_array.cxx
> ./UPDATE.sh: line 47: cd: /home/stir/devel/build/STIR/Release: No such file
> or directory
>
> I created the directory "/home/stir/devel/build/STIR/Release" and ran
> "UPDATE.sh" again but then I receive the error:
> Updating your STIR installation
> Already up-to-date.
> make: *** No rule to make target 'install'. Stop.
>
> Has anyone had a similar problem before?
> Kind regards,
> Christoph
|