''' sudo mount -t cifs //LAPTOP-M5R1LI43/Users/stefan/Documents/gitRepos/Unimog-Lane-Detection ~/Documents/gitRepos -o username=jetson,password=jetson,vers=3.0,sec=ntlmssp,uid=$(id -u),gid=$(id -g) '''
Automated setup script for Ubuntu that installs Docker Compose and VS Code with all dependencies.
- ✅ Automatic Git installation
- ✅ Git LFS (Large File Storage) installation and configuration
- ✅ NVIDIA GPU Driver installation (auto-detects GPU)
- ✅ CUDA Toolkit installation
- ✅ nvidia-docker integration for GPU containers
- ✅ Automatic Docker installation from official Docker repository
- ✅ Docker Compose standalone installation (latest version)
- ✅ VS Code installation from Microsoft repository
- ✅ System package updates
- ✅ Docker daemon configuration and user permissions
- ✅ Installation verification
- ✅ Error handling and status messages
- Ubuntu 20.04 LTS or later
- Sudo access (script requires sudo permissions)
- Internet connection
curl -fsSL https://raw.githubusercontent.com/yourusername/ubuntuSetup/main/setup.sh | bashgit clone https://github.com/yourusername/ubuntuSetup.git
cd ubuntuSetup
chmod +x setup.sh
./setup.shchmod +x setup.sh
./setup.sh- Git version control system
- Git LFS (Large File Storage) for managing large binary files
- Automatically initialized for the current user
- NVIDIA GPU Drivers (version 535)
- CUDA Toolkit (version 12.3)
- nvidia-docker for GPU-accelerated containers
- Docker Engine (latest stable)
- Docker CLI
- containerd
- Docker CLI plugin for Compose
- Standalone docker-compose binary (latest version)
- Located at
/usr/local/bin/docker-compose
- Latest stable version from Microsoft repository
- Installed via apt package manager
- Ready to use with extensions
After running the script, you may need to:
-
Reboot (for NVIDIA GPU drivers) - If NVIDIA drivers were installed:
sudo reboot
-
Log out and log back in for Docker group permissions to take effect:
exit # Log back in to your user account
Or use:
newgrp docker
-
Reload shell configuration (if CUDA was installed):
source ~/.bashrc
-
Verify installations:
git lfs version docker --version docker-compose --version code --version
-
Test NVIDIA GPU (if installed):
nvidia-smi nvcc --version docker run --rm --gpus all nvidia/cuda:12.3.0-runtime-ubuntu22.04 nvidia-smi
-
Test Docker:
docker ps
-
Launch VS Code:
code
check_ubuntu()- Validates that the script is running on Ubuntuupdate_system()- Updates all system packagesinstall_git()- Installs Git version controlinstall_git_lfs()- Installs Git LFS and initializes itinstall_docker()- Installs Docker from official repositoryinstall_docker_compose()- Installs standalone docker-composeinstall_vscode()- Installs VS Code from Microsoft repositoryconfigure_docker_permissions()- Adds user to docker groupverify_installations()- Verifies all installations
The script exits immediately on any error with a clear error message.
- Ubuntu 20.04 LTS (Focal)
- Ubuntu 22.04 LTS (Jammy)
- Ubuntu 24.04 LTS (Noble)
- Other Ubuntu versions may work but are untested
Make sure you have an NVIDIA GPU and the drivers are properly connected. Check:
lspci | grep -i nvidiaLog out and log back in, or reboot the system for drivers to take effect:
nvidia-smiMake sure you've logged out and logged back in after running the script.
Make sure the script is executable:
chmod +x setup.shEnsure you have a stable internet connection. The script downloads packages from:
apt.ubuntu.comdownload.docker.compackages.microsoft.comgithub.com(for docker-compose releases)
If running in headless environment, VS Code installation will complete but GUI won't start. This is normal.
Edit setup.sh to skip specific components:
# Comment out these lines to skip:
install_git
install_git_lfs
install_docker
install_docker_compose
install_vscode- The script runs with
set -eto exit on errors - Uses official repositories from Docker and Microsoft
- Downloads and verifies GPG keys for package authentication
- Requires sudo for system-level installations
MIT
For issues or questions, please create an issue on the repository.
If you prefer manual installation, here are the equivalent commands:
sudo apt-get update
sudo apt-get install -y gitcurl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
sudo apt-get install -y git-lfs
git lfs installsudo apt-get update
sudo apt-get install -y ca-certificates curl gnupg lsb-release
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
sudo systemctl start docker
sudo systemctl enable dockersudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-composesudo apt-get install -y software-properties-common apt-transport-https wget
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" -y
sudo apt-get update
sudo apt-get install -y codesudo usermod -aG docker $USER