even more updates
This commit is contained in:
parent
bed6b665ef
commit
0aa12c59af
3
.aliases
3
.aliases
|
@ -41,7 +41,10 @@ alias dih="docker container inspect -f '{{ .Config.Hostname }}'" # call with <co
|
||||||
alias dstats="docker stats "'$(sudo docker ps -aq)' # shows stats thingy for all containers
|
alias dstats="docker stats "'$(sudo docker ps -aq)' # shows stats thingy for all containers
|
||||||
|
|
||||||
alias drmsc="docker container prune"
|
alias drmsc="docker container prune"
|
||||||
|
#alias drmsc="docker container ls -a | grep Exited | awk '{print $1}' | xargs docker container rm" # removes stopped containers
|
||||||
|
|
||||||
alias drmdi="docker image prune"
|
alias drmdi="docker image prune"
|
||||||
|
#alias drmdi="docker image remove "'$(docker image ls -q -f dangling=true)' # removes non-tagged images
|
||||||
|
|
||||||
# docker swarm
|
# docker swarm
|
||||||
alias dss='docker stack services '
|
alias dss='docker stack services '
|
||||||
|
|
16
.dockerfunc
16
.dockerfunc
|
@ -544,3 +544,19 @@ wireshark() {
|
||||||
jess/wireshark
|
jess/wireshark
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
woeusb() {
|
||||||
|
del_stopped woeusb
|
||||||
|
|
||||||
|
docker run -it \
|
||||||
|
-v /etc/localtime:/etc/localtime:ro \
|
||||||
|
-v /tmp/.X11-unix:/tmp/.X11-unix \
|
||||||
|
-v $(pwd):/home/woe \
|
||||||
|
-v /dev/:/shared_devs \
|
||||||
|
-v /mnt/:/mnted_devs \
|
||||||
|
-e DISPLAY=unix$DISPLAY \
|
||||||
|
--privileged \
|
||||||
|
--name woeusb \
|
||||||
|
${DOCKER_REPO_PREFIX}/woeusb
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ set -x
|
||||||
# backup.sh
|
# backup.sh
|
||||||
|
|
||||||
pre="/home/fschl"
|
pre="/home/fschl"
|
||||||
target="/media/black_Backups/2018-12"
|
target="/media/store/"
|
||||||
# target="/media/driveBay/Backups"
|
# target="/media/driveBay/Backups"
|
||||||
|
|
||||||
folders=( "Documents" #contains Org files
|
folders=( "Documents" #contains Org files
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# install.sh
|
# install.sh
|
||||||
# This script installs my basic setup for a debian machine
|
# This script installs a basic setup for a debian machine
|
||||||
|
|
||||||
USERNAME=fschl
|
USERNAME=fschl
|
||||||
SUDO="sudo"
|
SUDO="sudo"
|
||||||
|
@ -20,7 +20,7 @@ check_root() {
|
||||||
}
|
}
|
||||||
|
|
||||||
apt_sources() {
|
apt_sources() {
|
||||||
# http://deb.debian.org/
|
# https://www.debian.org/releases/
|
||||||
ddist=$1
|
ddist=$1
|
||||||
DIST="${ddist:-stable}"
|
DIST="${ddist:-stable}"
|
||||||
|
|
||||||
|
@ -177,7 +177,6 @@ install_nvidia_docker() {
|
||||||
}
|
}
|
||||||
|
|
||||||
install_latex() {
|
install_latex() {
|
||||||
|
|
||||||
apt update
|
apt update
|
||||||
apt install -y \
|
apt install -y \
|
||||||
evince \
|
evince \
|
||||||
|
@ -360,6 +359,33 @@ install_syncthing() {
|
||||||
$SUDO systemctl start syncthing@${USERNAME}.service
|
$SUDO systemctl start syncthing@${USERNAME}.service
|
||||||
systemctl status syncthing@${USERNAME}.service
|
systemctl status syncthing@${USERNAME}.service
|
||||||
|
|
||||||
|
no_suspend
|
||||||
|
|
||||||
|
echo "... setting capslock to control"
|
||||||
|
sed -i "s/^XKBOPTIONS=.*/XKBOPTIONS=\"ctrl:nocaps\"/" /etc/default/keyboard
|
||||||
|
|
||||||
|
TARGET="/home/$USERNAME/.emacs.d"
|
||||||
|
git clone https://github.com/syl20bnr/spacemacs "${TARGET}"
|
||||||
|
#rm -rf "${TARGET}"/private/snippets
|
||||||
|
#git clone https://github.com/AndreaCrotti/yasnippet-snippets "${TARGET}"/private/yas-snips
|
||||||
|
#ln -s "${TARGET}"/private/yas-snips/snippets "${TARGET}"/private/snippets/
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
link_userdirs() {
|
||||||
|
|
||||||
|
mount_dir=$1
|
||||||
|
target_mount="${mount_dir:-/mnt/docs/}"
|
||||||
|
user_dirs=("Documents Downloads Music Pictures Videos")
|
||||||
|
for DIR in $user_dirs
|
||||||
|
do
|
||||||
|
echo "removing and linking ${DIR}..."
|
||||||
|
rm -rfv /home/$USERNAME/$DIR
|
||||||
|
echo "link target: ${target_mount}/${DIR}"
|
||||||
|
ln -vs ${target_mount}/${DIR} /home/${USERNAME}/${DIR}
|
||||||
|
done
|
||||||
|
|
||||||
|
projects_mount=$docs_mount
|
||||||
}
|
}
|
||||||
|
|
||||||
install_vscodium() {
|
install_vscodium() {
|
||||||
|
@ -459,6 +485,49 @@ install_compose() {
|
||||||
/usr/bin/docker-compose version
|
/usr/bin/docker-compose version
|
||||||
}
|
}
|
||||||
|
|
||||||
|
install_nvidia() {
|
||||||
|
echo "Prepare install for NVIDIA proprietary display driver"
|
||||||
|
|
||||||
|
apt update
|
||||||
|
apt install -y \
|
||||||
|
gcc \
|
||||||
|
linux-source \
|
||||||
|
linux-headers-`uname -r` \
|
||||||
|
--no-install-recommends
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "Please find a link to the current Package"
|
||||||
|
echo " https://devtalk.nvidia.com/default/topic/533434/linux/current-graphics-driver-releases/"
|
||||||
|
echo ""
|
||||||
|
echo "1. Download the self extracting archive. (*.run)"
|
||||||
|
echo "2. reboot into recovery mode and login as root"
|
||||||
|
echo "3. sh DRIVER_ARCHIVE.run"
|
||||||
|
echo ""
|
||||||
|
echo "... check if driver was installed correctly: $ nvidia-smi"
|
||||||
|
echo "more information can be found in README at link above"
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "Install NVIDIA-docker"
|
||||||
|
echo ""
|
||||||
|
echo "since Docker 19.03 no additional runtime required."
|
||||||
|
echo " https://github.com/NVIDIA/nvidia-docker"
|
||||||
|
|
||||||
|
# https://nvidia.github.io/nvidia-docker/
|
||||||
|
distribution="debian10"
|
||||||
|
|
||||||
|
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -
|
||||||
|
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
|
||||||
|
apt update
|
||||||
|
apt install -y nvidia-container-toolkit
|
||||||
|
systemctl restart docker
|
||||||
|
docker pull nvidia/cuda:9.0-base
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "... check if driver was installed correctly: "
|
||||||
|
echo "$ docker run --gpus all nvidia/cuda:9.0-base nvidia-smi"
|
||||||
|
echo " should give same output as above"
|
||||||
|
}
|
||||||
|
|
||||||
install_virtualbox() {
|
install_virtualbox() {
|
||||||
# https://wiki.debian.org/VirtualBox#Installation_of_non-free_edition
|
# https://wiki.debian.org/VirtualBox#Installation_of_non-free_edition
|
||||||
$SUDO apt install -y \
|
$SUDO apt install -y \
|
||||||
|
@ -531,11 +600,13 @@ main() {
|
||||||
case "$cmd" in
|
case "$cmd" in
|
||||||
base)
|
base)
|
||||||
base_applications
|
base_applications
|
||||||
install_docker
|
|
||||||
install_compose
|
|
||||||
;;
|
;;
|
||||||
server)
|
server)
|
||||||
|
apt_sources buster
|
||||||
|
base_applications
|
||||||
install_server_base
|
install_server_base
|
||||||
|
install_docker
|
||||||
|
install_compose
|
||||||
;;
|
;;
|
||||||
i3)
|
i3)
|
||||||
base_applications
|
base_applications
|
||||||
|
@ -549,6 +620,9 @@ main() {
|
||||||
install_sway
|
install_sway
|
||||||
install_workstation_apps
|
install_workstation_apps
|
||||||
;;
|
;;
|
||||||
|
links)
|
||||||
|
link_userdirs /mnt/docs/
|
||||||
|
;;
|
||||||
latex)
|
latex)
|
||||||
install_latex
|
install_latex
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in New Issue