Commit 16d4c6ca authored by Christian Godenschwager's avatar Christian Godenschwager
Browse files

initial commit

parents
#!/bin/bash -e
IMAGE=$1
CONTAINER="$(docker run -it -d --cap-add=SYS_PTRACE --security-opt seccomp=unconfined ${IMAGE})"
CONTAINER_SHORT=${CONTAINER:0:8}
docker exec ${CONTAINER} apt-get update
docker exec ${CONTAINER} apt-get install -y wget curl gdb valgrind
if [ -f ~/.bashrc ]; then
echo "Copying your bashrc to container"
docker cp ~/.bashrc ${CONTAINER}:/root/.bashrc
fi
if [ -f ~/.gitconfig ]; then
echo "Copying your git config to container"
docker cp ~/.gitconfig ${CONTAINER}:/root/.gitconfig
fi
if [ -f ~/.vimrc ]; then
echo "Copying your vim config to container"
docker cp ~/.vimrc ${CONTAINER}:/root/.vimrc
fi
#docker exec ${CONTAINER} /bin/bash -c "echo \"if dpkg --compare-versions `ompi_info | head -2 | tail -1 | sed 's/[^0-9.]*\([0-9.]*\).*/\1/'` ge 1.10; then export MPIEXEC_PREFLAGS="--allow-run-as-root" ; fi\" >> /root/.bashrc"
docker exec ${CONTAINER} curl -L https://github.com/git/git/raw/master/contrib/completion/git-prompt.sh -o /root/.git-prompt.sh
docker restart ${CONTAINER}
docker exec ${CONTAINER} git clone https://i10git.cs.fau.de/walberla/walberla.git /walberla
docker exec ${CONTAINER} /bin/bash -c "if dpkg --compare-versions `ompi_info | head -2 | tail -1 | sed 's/[^0-9.]*\([0-9.]*\).*/\1/'` ge 1.10; then export MPIEXEC_PREFLAGS="--allow-run-as-root" ; fi && mkdir /build && cd /build && cmake -DWALBERLA_BUILD_TESTS=ON -DWALBERLA_BUILD_BENCHMARKS=ON -DWALBERLA_BUILD_TUTORIALS=ON -DWALBERLA_BUILD_WITH_MPI=ON -DWALBERLA_BUILD_WITH_CUDA=\$WALBERLA_BUILD_WITH_CUDA -DWALBERLA_BUILD_WITH_PYTHON=\$WALBERLA_BUILD_WITH_PYTHON -DWALBERLA_BUILD_WITH_OPENMP=ON -DMPIEXEC_PREFLAGS=\$MPIEXEC_PREFLAGS -DWARNING_ERROR=ON /walberla"
echo
echo "Start second shell with \"docker exec -it ${CONTAINER_SHORT} /bin/bash\""
echo
docker attach ${CONTAINER}
echo
echo "Delete: docker rm ${CONTAINER_SHORT}"
echo
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment