Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Christian Godenschwager
wbdbg_container
Commits
16d4c6ca
Commit
16d4c6ca
authored
Jan 10, 2018
by
Christian Godenschwager
Browse files
initial commit
parents
Changes
1
Hide whitespace changes
Inline
Side-by-side
wbdbg_container.sh
0 → 100755
View file @
16d4c6ca
#!/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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment