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:
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!
-
sudo apt install git git --version git config --global user.name "John Doe" git config --global user.email "jdoe@email"
Firs install brew and then git
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install git
Windows https://gitforwindows.org/
There are several GIT repositories:
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 |
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.
https://hub.docker.com/?overlay=onboarding
https://hub.docker.com/?overlay=onboarding
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 |
git clone https://github.com/lbarosi/BINGO-Hackaton.git
cd BINGO-Hackaton
git checkout
cd bingo-Hackaton
docker build -t lbarosi/cosmos:complete -f Dockerfile-cosmos .
or
make build
docker run --rm --mount type=bind,source=$(SOURCE),target=$(TARGET) $(IMAGE):$(TAG)
or
make run-jupyter TAG=complete
Docker IMAGE
Linux UBUNTU system
Gnu compilers
Python3 and Python2 installed
Conda manager
Jupyter Notebook
-
Open your browser and point to http://localhost:8888 and use the password to access the jupyter Notebook.
-
Open the notebook lessonsTOC.ipynb