Commit e819f511 authored by nvmnghia's avatar nvmnghia

Initial commit

parents
Pipeline #58 canceled with stages
# Setup Lub~~e~~untu
Run the script with `sudo`, otherwise magic doesn't work.
Theoretically, `code.deb` doesn't need to be updated, since the official `apt` repo will also be installed. The final `apt upgrade` will get the job done.
#!/bin/bash
# Test root, if not, restart as root
if [[ $EUID -ne 0 ]];
then
exec sudo /bin/bash "$0" "$@"
fi
apt update -y
apt install -y openssh-server
# Courtesy of Don Cullen
# https://askubuntu.com/a/905895/892000
echo "Install VSCode"
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
bash -c 'echo "deb [arch=amd64] http://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
apt update -y
apt install -y code
if ! [ -x "$(command -v git)" ]; then
echo "Error, now install using local deb package and extensions"
dpkg -i ./code.deb
fi
while read p; do
code --install-extension $p
done < code_ext.txt
echo "Install Skype using latest online deb package"
wget -O skype.deb https://repo.skype.com/latest/skypeforlinux-64.deb
dpkg -i skype.deb
rm skype.deb
echo "Install anaconda"
ANACONDA_LATEST=$(wget -r --spider -l 1 https://repo.anaconda.com/archive/ 2>&1 | grep Anaconda3 \
| grep 2019 | grep -v ppc64le | grep -m 1 Linux) # -m 1 to grep the first match
ANACONDA_LATEST=${ANACONDA_LATEST##*-- } # Keep the https part, which is right after '-- '
wget -O anaconda.sh $ANACONDA_LATEST
bash -p $HOME/anaconda
rm anaconda.sh
echo "Install docker"
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
rm get-docker.sh
echo "Install GPU driver"
if lspci -nnk | grep -i vga -A3 | grep 'in use' | grep -q 'i915'; then
echo "Intel GPU, good luck poor guy"
else
echo "nVIDIA GPU, check driver"
if lspci -nnk | grep -i vga -A3 | grep 'in use' | grep -q 'nvidia'; then
echo "Use nVIDIA driver, hope u got the latest cuz I won't check"
else
echo "Use nouveau, download driver"
wget http://us.download.nvidia.com/XFree86/Linux-x86_64/418.88/NVIDIA-Linux-x86_64-418.88.run
echo "Installing..."
chmod +x NVIDIA-Linux-x86_64-418.88.run
./NVIDIA-Linux-x86_64-418.88.run
rm NVIDIA-Linux-x86_64-418.88.run
fi
echo "Install nvidia-container-toolkit"
apt install -y nvidia-container-toolkit
fi
apt update -y
apt upgrade -y
File added
christian-kohler.path-intellisense
eamodio.gitlens
GrapeCity.gc-excelviewer
Gruntfuggly.todo-tree
James-Yu.latex-workshop
ms-azuretools.vscode-docker
ms-python.python
ms-vscode-remote.vscode-remote-extensionpack
ms-vscode.cpptools
nhoizey.gremlins
shd101wyy.markdown-preview-enhanced
twxs.cmake
vector-of-bool.cmake-tools
VisualStudioExptTeam.vscodeintellicode
vscode-icons-team.vscode-icons
yzhang.markdown-all-in-one
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