bonepro/eb8aedd61366master
bonepro/
eb8aedd61366master
README.md
README.md
BonePro
BonePro container contains environment to run tools in bone biomechanics analysis.
- CentOS 7.6
- gcc 4.8.5
- Python 2.7.5
- Numpy 1.9.2
- Scipy 0.13.2
- Calculix
- Using the BonePro Container with Singularity ##
- Install Singularity on your system <br> for more details: https://singularity.lbl.gov/install-linux
- CentOS ` $ sudo yum install -y epel-release $ sudo yum install -y singularity `
- Debian/Ubuntu ` $ sudo wget -O- http://neuro.debian.net/lists/xenial.us-ca.full | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list $ sudo apt-key adv --recv-keys --keyserver hkp://pool.sks-keyservers.net:80 0xA5D32F012649A5A9 $ sudo apt-get update $ apt-get install -y singularity-container `
- MAC OS
- Download a Vagrant package from https://www.vagrantup.com/downloads.html
- Install the Vagrant package
- Download and install VirtualBox
- Create a virtualbox (a virtualbox per folder) ` $ mkdir virtualbox0/ $ cd virtualbox0 $ vagrant init centos/7 `
- Look at "Vagrantfile" ` Vagrant.configure("2") do |config| config.vm.box = "centos/7"
config.vm.synced_folder "../data", "/vagrant_data"
config.vm.provider "virtualbox" do |vb| vb.memory = "1024" end ` - to start the virtualbox
- Spin up the virtualbox $ vagrant up
- Log in to the virtualbox $ vagrant ssh
- Install Singularity as in CentOS7
- to stop the virtualbox
- Log out $ exit
- Shutdown the virtualbox $ vagrant destroy
- Test the installation ` $ singularity pull shub://vsoch/hello-world $ singularity run vsoch-hello-world-master-latest.simg `
- Pull and build a bonepro image on your local machine ` $ singularity build bonepro-centos76-calculix.simg docker://sissource.ethz.ch:5005/sispub/bonepro/centos76-calculix:v0 `
- Run the container ` $ singularity exec bonepro-centos76-calculix.simg `
- Developing the BonePro Container with Docker ##
- Install Docker (https://docs.docker.com/install/)
- Download bonepro ` $ git clone git@sissource.ethz.ch:sis/bonepro.git `
- Build a docker image ` $ cd bonepro/container/ $ docker build -t container-image-name:tag . ` The container images can be pushed to the public Dockerhub. Therefore, container-image-name:tag shall be named yourdockerhubusername/image-name:tag <br> To prepare the image for pushing to a public registry on sissource.ethz.ch, container-image-name:tag can be named, for example, ` sissource.ethz.ch:5005/sispub/bonepro:tag sissource.ethz.ch:5005/sispub/bonepro/optional-image-name:tag sissource.ethz.ch:5005/sispub/bonepro/optional-name/optional-image-name:tag ` When you type ` $ docker images -a ` you should see the images list ` REPOSITORY TAG IMAGE ID CREATED SIZE container-name tag 939078176e11 4 weeks ago 4.55GB `
- Push the image to a registry ` $ docker push container-image-name:tag `
- Run docker in bash mode ` $ docker run -it container-image-name:tag /bin/bash `
- Run the docker conainter. Before running the command, set the correct paths to data, medtool and scripts. ` $ docker run \ -v /path/to/data:/mnt/data \ -v /path/to/medtool_functions:/mnt/medtool \ -v /path/to/scripts:/mnt/scripts \ boneproapp \ python2.7 \ /mnt/scripts/AIM2FE_v5.py \ /mnt/medtool \ /mnt/data/D_FEA_PRE_179/C0002234.AIM \ 3 yes 0.3 local `
c4science · Help