mutatisIV / BINGO-Hackaton

Instructions to construct a docker image with a lot of tools for modern observational cosmology and a set of lectures.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BINGO Hackaton

This is intended to be a course on cosmological code for modern observational cosmology aiming graduate students.

You will fild here hands on lessons and detailed instruction to build your own system with docker.

This system provides:

  • camb
  • class
  • CosmoMC
  • MontePython
  • Cosmosis
  • Cobaya
  • CosmoHammer

You should start learning here. You may run the python part of the course in binder: Binder

I am in a hurry:

git clone https://github.com/lbarosi/BINGO-Hackaton.git
cd BINGO-Hackaton
make build
make run  

Open your browser and navigate to http://localhost:8888

WARNING: building the docker image the first time may take almost 1 hour!

BINGO Hackaton

Preliminares

GIT

Installation

  1. Linux Systems

    sudo apt install git
    git --version
    git config --global user.name "John Doe"
    git config --global user.email "jdoe@email"
  2. Mac OSX

Firs install brew and then git

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install git
  1. Windows https://gitforwindows.org/

Cloud Git

There are several GIT repositories:

GitHUB BitBucket

Useful Commands

Goal command
create local repo git init
clone remote repo git clone john@host:/path
add files git add *
commit your changes git commit -m "message"
send changes to remote git push origin master
fetch from remote and merge git pull

DOCKER

Installation

  1. Linux Systems
sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt update
sudo apt install docker-ce

After install you should allow non-root users:

sudo systemctl status docker
sudo usermod -aG docker ${USER}

Restart your session.

  1. Mac OSX

https://hub.docker.com/?overlay=onboarding

  1. Windows

https://hub.docker.com/?overlay=onboarding

Useful Commands

Goal command
list images docker images
list containers docker container ls
build image docker build --tag=name .
run containers docker run --init -ti imagename /bin/bash
remove image docker rmi -f imagename
prune (use with care) docker system prune --filter "until=24h"
commit changes docker commit CONTAINER IMAGE

Starting to Work

Cloning the repo

git clone https://github.com/lbarosi/BINGO-Hackaton.git
cd BINGO-Hackaton
git checkout

Making the container

cd bingo-Hackaton
docker build -t lbarosi/cosmos:complete -f Dockerfile-cosmos .

or

make build

real 45m22,561ss

Running the container and further installs

docker run --rm --mount type=bind,source=$(SOURCE),target=$(TARGET) $(IMAGE):$(TAG)

or

make run-jupyter TAG=complete

Checking What we have so far

  1. Docker IMAGE
  2. Linux UBUNTU system
  3. Gnu compilers
  4. Python3 and Python2 installed
  5. Conda manager
  6. Jupyter Notebook

We are Ready for Cosmology

About

Instructions to construct a docker image with a lot of tools for modern observational cosmology and a set of lectures.

License:GNU General Public License v3.0


Languages

Language:Jupyter Notebook 97.9%Language:HTML 1.8%Language:Python 0.2%Language:Shell 0.0%Language:Makefile 0.0%