Building a Cost-Effective Personal Deep Learning Workstation Using Refurbished Components

Hardware Platform

To balance cost efficiency and future multi-GPU expandability, used enterprise-grade hardware platforms with high PCIe lane counts are prioritized. The Intel 10th Gen X-series CPU paired with an X299 motherboard is selected, offering 48 total PCIe lanes to support multi-GPU and high-speed storage expansion. The combined cost of the used CPU and motherboard is lower than a single new 14th Gen Intel i9 processor. For large language model workloads that require high VRAM, a modified 22GB RTX 2080Ti (with NVLink support for future multi-GPU clusters) is chosen as the initial GPU. Reliability-critical components including RAM, solid state storage, and power supply are purchased new to avoid stability issues. The full hardware configuration is listed below:

  • CPU: Intel Core i9-10940X
  • GPU: Modified 22GB RTX 2080Ti
  • Memory: 32GB*2 Great Wall heatspreader DDR4 (motherboard supports 8 slots 4-channel up to 256GB for future expansion)
  • Motherboard: Gigabyte X299X AORUS MASTER (4 PCIe slots, supports x16/x8/x8/x8 bifurcation)
  • Storage: 2TB Great Wall M.2 NVMe SSD (motherboard supports 3 M.2 slots for future expansion)
  • Power Supply: 1250W Great Wall 80 Plus Gold fully modular PSU
  • Cooling: ID-Cooling 360mm AIO liquid cooler + multiple 120mm case fans
  • Chassis: Great Wall KM7 tower case

System Installation

Ubuntu is selected as the operating system for personal development use. To create a bootable USB installation drive:

  1. Download the free trial version of UltraISO from its official website, launch after installation and select "Continue to Try"
  2. Download the Ubuntu 18.04 ISO image from Tsinghua University Open Source Mirror Station
  3. Open the downloaded ISO file in UltraISO, follow the steps below to write the image to the USB drive: Boot > Write Disk Image > Set write mode to USB-HDD or USB-HDD+ > Select Easy Boot > Write New Drive Boot Sector > Choose syslinux > Click Write
  4. Wait for the write process to complete, then boot the workstation from the USB drive to install Ubuntu. Standard installation steps are followed, which are widely documented online so are not repeated here.

System Environment Configuration

Replace APT Software Sources

First back up the original source configuration:

cp /etc/apt/sources.list /etc/apt/sources.list.backup

Edit /etc/apt/sources.list and replace its content with one of the following domestic mirror sources to speed up software download:

# Tsinghua University Source
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse

# Alibaba Cloud Source
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

# University of Science and Technology of China Source
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse

Install Required Base Software

# Update software list and upgrade existing packages
sudo apt update && sudo apt upgrade -y

# Install common development tools
sudo apt install -y vim openssh-server net-tools git

Configure SSH Remote Access

Remote desktop is not configured as terminal access via SSH meets daily development needs, and the workstation is physically located within direct access range of the main display. First check the local IP address:

ip a

Add the following script to the end of ~/.bashrc to auto-start the SSH daemon on shell initialization:

# Auto-start SSH service if not running
if ! systemctl is-active --quiet ssh; then
  sudo systemctl start ssh > /dev/null 2>&1
  echo " > SSH daemon started successfully"
else
  echo " > SSH daemon is already active"
fi

Install Python and Pip

sudo apt install -y python3 python3-pip

For version-specific Python requirements, it is recommended to manage environments via Conda after its installation. First configure the domestic pip source to speed up package installation:

mkdir -p ~/.pip
vim ~/.pip/pip.conf

Add the following contant to use Tsinghua PyPI mirror:

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple/
[install]
trusted-host = pypi.tuna.tsinghua.edu.cn

Adjust default Python soft links as needed:

# Force overwrite existing soft links
sudo ln -sf /usr/bin/python2 /usr/bin/python
sudo ln -sf /usr/bin/python3 /usr/bin/python3
sudo ln -sf /usr/bin/pip3 /usr/bin/pip

Deep Learning Development Environment Configuration

Install NVIDIA GPU Driver

The simplest installation method for desktop Ubuntu is via the built-in software manager: Open Software & Updates, navigate to the Additional Drivers tab, select the latest proprietary NVIDIA driver from the list, click Apply Changes and wait for installation to complete. Reboot the system after installation, then run nvidia-smi to confirm the driver is loaded correctly.

Install CUDA Toolkit

If old versions of CUDA or CuDNN exist on the system, uninstall them first:

sudo apt purge "*nvidia*" -y

Reinstall the NVIDIA driver following the steps above, then download the matching CUDA runfile installer from the NVIDIA CUDA Toolkit Archive. For RTX 2080Ti, select the linux-x86_64 > Ubuntu > 18.04 > runfile (local) package for CUDA 10.1. Make the installer executable and run it:

chmod +x cuda_10.1.105_418.39_linux.run
sudo sh ./cuda_10.1.105_418.39_linux.run

Uncheck the NVIDIA driver installation option during setup, as the driver is already installed independently. Add CUDA environment variables to the end of ~/.bashrc:

export CUDA_HOME=/usr/local/cuda-10.1
export PATH=$PATH:${CUDA_HOME}/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${CUDA_HOME}/lib64

Apply the environment variables:

source ~/.bashrc

Verify installation with nvcc -V, or compile the official sample program to confirm functionality:

cd NVIDIA_CUDA-10.1_Samples/1_Utilities/deviceQuery
make
./deviceQuery

A successful installation will print detailed GPU parameter information.

Install CuDNN

Download the CuDNN version matching your CUDA version from the NVIDIA CuDNN download page, then extract the compressed package:

tar -xzvf cudnn-10.1-linux-x64-v8.0.5.39.tgz

Copy the CuDNN files to the CUDA directory and set appropriate permissions:

sudo cp cuda/include/cudnn*.h /usr/local/cuda-10.1/include/
sudo cp cuda/lib64/libcudnn* /usr/local/cuda-10.1/lib64/
sudo chmod a+r /usr/local/cuda-10.1/include/cudnn*.h /usr/local/cuda-10.1/lib64/libcudnn*

Check the installed CuDNN version:

cat /usr/local/cuda-10.1/include/cudnn_version.h | grep -E 'CUDNN_MAJOR|CUDNN_MINOR|CUDNN_PATCHLEVEL'

Install Conda Environment Manager

Conda isolates development environments to avoid package version conflicts between different deep learning frameworks. Download the Anaconda Linux installer from the official website, then run the installer:

chmod +x Anaconda3-2023.09-0-Linux-x86_64.sh
./Anaconda3-2023.09-0-Linux-x86_64.sh

Follow the prompts to complete installation, select yes when asked to initialize Conda. Restart the terminal to activate Conda, the default base environment will be displayed in the terminal prompt. Common Conda operations:

# Create a new environment named dl_env_py38 with Python 3.8
conda create --name dl_env_py38 python=3.8 -y

# Activate the environment
conda activate dl_env_py38

# Exit the current environment
conda deactivate

Install NVIDIA-Docker

NVIDIA-Docker enables GPU access inside Docker containers, ideal for isolating diffferent project environments without polluting the host system. First install Docker:

sudo apt update
sudo apt install -y docker.io
sudo systemctl start docker
sudo systemctl enable docker

Verify Docker installation with docker --version. Next install the NVIDIA Container Toolkit:

# Add NVIDIA Docker repository
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
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

# Install toolkit and restart Docker
sudo apt update && sudo apt install -y nvidia-container-toolkit
sudo systemctl restart docker

Test the installation by running a CUDA base container:

sudo docker run --rm --gpus all nvidia/cuda:10.1-base nvidia-smi

A successful installation will print the same GPU status output as running nvidia-smi on the host.

Workstation Maintenance

System Backup and Restore

Leveraging Linux's everything-is-a-file design, the entire root file system can be packed into a compressed archive for backup, excluding temporary and runtime directories:

sudo tar -cvpzf ubuntu_sys_backup_$(date +%Y%m%d).tar.gz \
--exclude=/proc --exclude=/tmp --exclude=/boot --exclude=/lost+found \
--exclude=/media --exclude=/mnt --exclude=/run --exclude=/swapfile /

The generated tar.gz file contains a full backup of the system state. For system restore:

  1. If the system is still bootable, simply extract the required files from the backup archive to replace corrupted files.
  2. If the system fails to boot or you are migrating to a new disk, first install a clean Ubuntu 18.04 system on the target disk to automatically configure partition tables and mount points.
  3. Boot from the Ubuntu installation USB drive and select "Try Ubuntu without installing", mount the target system disk and the USB drive containing the backup file.
  4. Backup critical boot configuration files from the clean installation:
sudo su
# Replace [USB_MOUNT_PATH] and [TARGET_DISK_MOUNT_PATH] with actual mount paths
cp [TARGET_DISK_MOUNT_PATH]/boot/grub/grub.cfg [USB_MOUNT_PATH]/
cp [TARGET_DISK_MOUNT_PATH]/etc/fstab [USB_MOUNT_PATH]/

# Delete all files from the clean system partition
rm -rf [TARGET_DISK_MOUNT_PATH]/*

# Extract the backup archive to the target partition
cp [USB_MOUNT_PATH]/ubuntu_sys_backup_*.tar.gz [TARGET_DISK_MOUNT_PATH]/
cd [TARGET_DISK_MOUNT_PATH]
tar xvpfz ubuntu_sys_backup_*.tar.gz ./

# Recreate excluded directories
mkdir proc lost+found mnt sys media tmp run

# Replace boot configuration files with the backed up versions from the clean installation
cp [USB_MOUNT_PATH]/grub.cfg [TARGET_DISK_MOUNT_PATH]/boot/grub/
cp [USB_MOUNT_PATH]/fstab [TARGET_DISK_MOUNT_PATH]/etc/

Reboot the system after completing the above steps, the system will be restored to the exact state it was in when the backup was created, including all installed software and environment configurations.

Tags: Deep Learning Workstation Ubuntu Configuration GPU Environment Setup Cost-effective Hardware AI Development Environment

Posted on Mon, 18 May 2026 10:08:39 +0000 by optiplex