{"id":27966330,"url":"https://github.com/charlesq34/diy-deep-learning-workstation","last_synced_at":"2026-02-25T21:05:56.087Z","repository":{"id":86275087,"uuid":"92125952","full_name":"charlesq34/DIY-Deep-Learning-Workstation","owner":"charlesq34","description":"Build a deep learning workstation from scratch (HW \u0026 SW).","archived":false,"fork":false,"pushed_at":"2017-05-23T21:06:25.000Z","size":59,"stargazers_count":130,"open_issues_count":1,"forks_count":30,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-05-07T20:18:12.668Z","etag":null,"topics":["cuda","deep-learning","gpu","ubuntu","workstations"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/charlesq34.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-05-23T03:40:14.000Z","updated_at":"2024-12-19T06:30:23.000Z","dependencies_parsed_at":"2023-03-04T02:15:33.341Z","dependency_job_id":null,"html_url":"https://github.com/charlesq34/DIY-Deep-Learning-Workstation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/charlesq34/DIY-Deep-Learning-Workstation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charlesq34%2FDIY-Deep-Learning-Workstation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charlesq34%2FDIY-Deep-Learning-Workstation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charlesq34%2FDIY-Deep-Learning-Workstation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charlesq34%2FDIY-Deep-Learning-Workstation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/charlesq34","download_url":"https://codeload.github.com/charlesq34/DIY-Deep-Learning-Workstation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charlesq34%2FDIY-Deep-Learning-Workstation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29839990,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T20:42:33.054Z","status":"ssl_error","status_checked_at":"2026-02-25T20:42:21.322Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cuda","deep-learning","gpu","ubuntu","workstations"],"created_at":"2025-05-07T20:18:09.630Z","updated_at":"2026-02-25T21:05:56.066Z","avatar_url":"https://github.com/charlesq34.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# DIY-Deep-Learning-Workstation\nBuild a deep learning workstation from scratch. While this document is written for Ubuntu 14.04 with TensorFlow, most steps should also apply to other Ubuntu versions and deep leanring frameworks.\n\nHave fun DIY-ing!\n\n### Contents\n1. [Build a GPU Workstation](#1-build-a-gpu-workstation)\n2. [Install Ubuntu](#2-install-ubuntu)\n3. [Install CUDA and cuDNN](#3-install-cuda-and-cudnn)\n4. [Install TensorFlow](#4-install-tensorflow)\n5. [Others](#5-others)\n\n**Disclaimer:** This document records my own experience and lessons learnt in building a workstation for deep learning. However, there is no gurantee on saftey or success of the construction. It's your own responsibility to maintain safety during the process. Please refer to professional IT service when you have question or meet trouble.\n\n## 1. Build a GPU Workstation\nFeel free to skip this section if you already have a GPU machine or plan to buy a pre-assembled one.\n\n### Pick and purchase parts\nIn general, you need to have motherboard, CPU (including CPU fan), memory cards, power supply unit (PSU), hard drive (+SSD), case and graphics cards (GPUs). A good place to pick and compare computer parts is \u003ca href=\"https://pcpartpicker.com\" target=\"_blank\"\u003ePC Part Picker\u003c/a\u003e. The website will help you check compatibility of components and provides price comparisons from multiple providers, which is really helpful.\n\nYou can find my part list \u003ca href=\"https://pcpartpicker.com/list/LbT7Fd\" target=\"_blank\"\u003eHERE\u003c/a\u003e. The parts I bought are not completely the same as the list because, for convenience, I just bought all parts from \u003ca href=\"http://www.frys.com\" target=\"_blank\"\u003eFrys\u003c/a\u003e and choose parts depending on their availability. But at least you could get a sense of how much it costs and what parts are necessary. For my case it costs around $2.2k (May 2017) in total for a machine with two GTX 1080 GPUs, 32GB memory, 500GB SSD + 4TB hard drive with a quad-core i5 CPU and 850W power. Note that this spec is optimized for cost with strong constraint to preserve two GPUs. CPU, SSD and memory are compromised.\n\n### Assemble the machine\nRead the instructions of motherboard, power and case *carefully* before installation. There are also plenty of videos online on how to assemble a machine, which might be helpful if you are doing it the first time.\n\nA brief guideline on the assembling steps are as follows.\n1. Install CPU on motherboard, install CPU fan, make sure the CPU fan stays solid, connect fan power cable to motherboard\n2. Install memory card to motherboard\n3. Connect cables to PSU, motherboard power (2 of them one for CPU, one for motherboard general, read the text on the cable, don’t misplace the PCI power cables!), harddrive power (one for HD, one for SSD), GPU power (2 cables), put PSU into the case\n4. Install motherboard into the case, put the IO shield (the one for USB, ethernet etc.) before putting the motherboard\n5. Connect power, reset, LED etc. jump cables to motherboard, connect case fan power cables to motherboard, connect motherboard power cables\n6. Install HD and SSD, connect power cables\n7. Install GPUs, connect power cables\n8. Connect case cable to plug-in, start machine, enter the BIOS window to check if all HWs are detected and work normally :)\n\nTip:  if you find it extremely difficult to connect some cable, you are probably doing it in the wrong way!\n\n## 2. Install Ubuntu\nI assume at this step, you already have a functional machine connected to display, keyboard and mouse.\n\n### Create a bootable USB stick on Ubuntu\nAssuming you or your friend already have a computer, then you can prepare a USB stick for OS installation following this guideline: \u003ca href=\"https://www.ubuntu.com/download/desktop/create-a-usb-stick-on-ubuntu\" target=\"_blank\"\u003eCreate A USB Stick on Ubuntu\u003c/a\u003e or equivalents for \u003ca href=\"https://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows\" target=\"_blank\"\u003eWindows\u003c/a\u003e and \u003ca href=\"https://www.ubuntu.com/download/desktop/create-a-usb-stick-on-macos\" target=\"_blank\"\u003emacOS\u003c/a\u003e.\n\nThe 14.04 ISO file (ubuntu-14.04.5-desktop-amd64.iso ) can be found here: http://releases.ubuntu.com/14.04/\n\n### Install Ubuntu 14.04 LTS\nInsert the disk to the machine's USB stick. Start the machine and it should automatically enter a window for Ubuntu installation. If your system has a preinstalled OS, you need to modify BIOS boot order to set USB stick as first priority. The installation process should be very fast (less than 10 minutes for my case) and simple.\n\n## 3. Install CUDA and cuDNN\nThis and the following steps require Internet connection.\n\n### Preparation\n\nInstall some useful packages in terminal:\n``` bash\nsudo apt-get update\nsudo apt-get install \\\n  aptitude \\\n  freeglut3-dev \\\n  g++-4.8 \\\n  gcc-4.8 \\\n  libglu1-mesa-dev \\\n  libx11-dev \\\n  libxi-dev \\\n  libxmu-dev \\\n  nvidia-modprobe \\\n  python-dev \\\n  python-pip \\\n  python-virtualenv \\\n  vim\n```\n\n\n### Install CUDA\n\nDownload CUDA installation file: https://developer.nvidia.com/cuda-downloads\n\nChoose Linux -\u003e x86_64 -\u003e Ubuntu -\u003e 14.04 -\u003e deb (local)  -\u003e Download\n\nInstall CUDA in terminal (use the specific .deb file you've downloaded):\n``` bash\ncd ~/Downloads\nsudo dpkg -i cuda-repo-ubuntu1404-8-0-local-ga2_8.0.61-1_amd64.deb\nsudo apt-get update\nsudo apt-get install cuda\n```\n\nRestart the computer to activate CUDA driver. Now your screen resolution should be automatically changed to highest resolution for the display!\n\n### Install cuDNN\n\nThe NVIDIA CUDA® Deep Neural Network library (cuDNN) is aGPU-accelerated library of primitives for deep neural networks with optimizations for convolutions etc.\n\nRegister an (free) acount on NVIDIA website and login to download the latest cuDNN library: https://developer.nvidia.com/cudnn\n\nChoose the specific version of cuDNN (denpending on support of your prefered deep learning framework)\n\nChoose `Download cuDNN v5.1 (Jan 20, 2017), for CUDA 8.0` -\u003e `cuDNN v5.1 Library for Linux`\n\nInstall cuDNN (by copying files :) in terminal:\n```bash\ncd ~/Downloads\ntar xvf cudnn-8.0-linux-x64-v5.1.tgz\ncd cuda\nsudo cp lib64/* /usr/local/cuda/lib64/\nsudo cp include/cudnn.h /usr/local/cuda/include/\nsudo chmod a+r /usr/local/cuda/lib64/libcudnn*\n```\n\n### Update your .bashrc\n\nAdd the following lines to your `~/.bashrc` file (you can open it by `gedit ~/.bashrc` in terminal)\n```bash\nexport PATH=/usr/local/cuda/bin:$PATH\nexport MANPATH=/usr/local/cuda/man:$MANPATH\nexport LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH\n```\n\n```bash\nsource ~/.bashrc\n```\n\nTo check the installation, print some GPU and driver information by:\n```bash\nnvidia-smi\nnvcc --version\n```\n\n## 4. Install TensorFlow\nFollow TensorFlow official page for installation: https://www.tensorflow.org/install/\nOr install whatever deep learning frameworks that you prefer :)\n\nFor example to install TF1.1 with GPU and Python 2.7:\n```bash\nexport TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.1.0-cp27-none-linux_x86_64.whl\nsudo pip install --upgrade $TF_BINARY_URL\n```\n\n## 5. Others\n### Mount hard drive\n\nI used SSD as my boot dist and followed \u003ca href=\"https://www.cyberciti.biz/tips/fdisk-unable-to-create-partition-greater-2tb.html\" target=\"_blank\"\u003eTHIS\u003c/a\u003e document to mount the hard drive.\n\nTo check the disk status:\n```bash\nsudo fdisk -l /dev/sdb\n```\n\nTo create a partition start GNU parted as follows (assuming the hard drive is /dev/sdb):\n```bash\nsudo parted /dev/sdb\n```\n\nNow inside command line interface of the parted tool (set unit to TB and set a partition from 0TB to 4TB, then use `print` to check partition and use `quit` to save \u0026 quit the parted tool):\n```bash\n(parted) unit TB\n(parted) mkpart primary 0 4\n(parted) print\n(parted) quit\n```\n\nThen use mkfs.ext4 command to format the file system, enter:\n``` bash\nsudo mkfs.ext4 /dev/sdb1\n```\n\nType the following commands to mount /dev/sdb1, enter:\n``` bash\nsudo mkdir /data\nsudo mount /dev/sdb1 /data\n```\n\nYou can use `df -H` to check current disk info.\n\nTo kee the mount after reboot, add the mouting setup to `/etc/fstab`:\n```bash\nsudo vim /etc/fstab\n```\n\nAdd the following line at the end:\n\n`/dev/sdb1       /data   ext4    defaults        0       1`\n\n\n### Set up SSH connection\n\nServer side, install SSH server:\n```bash\nsudo apt-get install openssh-server\n```\n\nEdit SSH configuration to whitelist users:\n```bash\nsudo vim /etc/ssh/sshd_config\n```\nChange root login permission line to: PermitRootLogin no\n\nAdd allow users: AllowUsers your_username\n\nThen restart SSH server:\n```bash\nsudo /etc/init.d/ssh restart\nsudo ufw allow 22\n```\n\nClient side, to connect with the workstation, you need to firstly know the server's IP (or hostname if it has one). Use `ifconfig -a` on the server to check IP address (look for that in `eth0`).\n\nClient side (Mac OS), you need to whitelist the server IP in `/etc/hosts`:\n```bash\nsudo vim /etc/hosts\n```\n\nAdd line\n`\u003cserver IP\u003e \u003cserver hostname\u003e`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharlesq34%2Fdiy-deep-learning-workstation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharlesq34%2Fdiy-deep-learning-workstation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharlesq34%2Fdiy-deep-learning-workstation/lists"}