How to build a PC for Deep Learning (on a budget)?
We’re going to see in this article how to choose the right components when building a personal computer for Deep Learning.
The first goal of this post is not only to tell you what specific hardware you need to buy but also why you need to buy certain components, so that you will be able to to choose them based on your needs and budget.
The second goal of this post is to find the components that give the best value for their money, trying to keep the budget as tight as possible, but still being able to build a good machine for normale usage and deep learning.
What are the main components on a computer?
The computer to run need 7 main components:
- CPU (Processor)
- GPU (Graphic Card)
- PSU (Power Supply)
Each component needs to be there for a specific reason, and the requirements are different depending on the purpose that the computer has, if it’s for simple office usage, gaming or deep learning.
We’re going now to focus on each single component.
1. CPU (Processor)
The CPU is the main processor of our computer, so in reality is the unit which processes all the information to run the programs we use and to run the operating system itself.
How important is the CPU for Deep Learning?
Considering that all the heavy lifting for Deep Learning will be done by the GPU (graphic card), we can say that CPU is not so important.
At the same time we want a decent CPU to have a fast computer that will be able to run multitasking when we open many applications.
A 6 cores (12 threads) CPU is right now a good enough processor to use the computer to work even with heavy programs, and even if you like playing video games, it will be good to game in FULL HD (of course backed up by a good graphic card as well).
AMD or Intel?
On CPUs with similar performances usually AMD has a better price, so my choice goes to AMD.
- AMD Ryzen 5 2600 (6 cores, 3.4GHZ) – 141$
2. GPU (Graphic Card)
The GPU is the most important component for Deep Learning, as it will take charge of all the computing power to run the deep learning libraries when we train/test our models.
How to choose the right GPU?
When we choose a GPU we need to take into account these 2 things:
- It’s compatible with the Deep Learning library that we use. The most common deep learning libraries right now are Tensorflow, Pytorch and Keras.
- It has enough vRAM memory to fit the models. In simpler words, the bigger is our training dataset, the more memory we need. If there is not enough memory, we’re going to get an error.
AMD or Nvidia?
There is no real competition on Graphic Cards for deep learning and Nvidia is the only way to go at the moment.
Nvidia developed CUDA, an architecture which enables parallel computing and it’s compatible with the most important deep learning libraries (Tensorflow, Pytorch, Keras, Darknet and others).
What about AMD, is there an alternative AMD version of CUDA?
The amd CUDA alternative exists and it’s called ROCM, but it still is not popular, there is lack of support compared to nvidia and the performances are way too low still, to be taken into consideration as a real alternative.
- Nvidia GTX 1660 (6GB, 1408 CUDA cores) – 220$
- Nvidia GTX 1070 (8GB, 1920 CUDA cores) – 400$
- Nvidia GTX 1080TI (11GB, 3584 CUDA cores) – 1050$
The motherboard is the board which connects all the components together.
How to choose the motherboard?
When choosing a motherboard we need to take into consideration:
- It’s compatible with the CPU we choosed.
- It has a 16x 3.0 PCI express slot. This is usually not a problem, as by default all the modern motherboards have them.
Even better if there are more slots, so in the future we might decide to upgrade the computer by adding a second GPU.
- Gigabyte Aorus Elite b450 (ATX motherboard) – 110$
The RAM (Random Access Memory) on a normal usage of the computer is important when we want to open many applications, as once opened, they will be temporary loaded on the RAM).
For deep learning I suggest a minimum of at least 16 GB and a minimum frequency of 2400mhz.
- 16GB (2x8GB) – 70$
- 32GB (2x16GB) – 140$
5. PSU (Power Supply)
The PSU is the unit which gives the current to all the components of the computer.
How to choose the PSU?
When choosing a PSU we need to consider:
- How many watts the computer need. The 2 components that take the most of the power are the CPU and the GPU.
The CPU I suggested takes around 50watts while the GPUs from 100 to 250watts.
- The PSU must be a good quality one.
Don’t try saving money buying cheap power supplies (under 50 dollar) because they can easily damage your computer.
There is a an identification which tells you the quality of a PSU and it is the 80 PLUS trademark.
You can take a look here to know more about it: https://en.wikipedia.org/wiki/80_Plus
A 600watt PSU will be good enough to support all the components that I suggested you in this post.
- EVGA 600w (80+ Bronze) – 85$
- Cooler Master MWE 600 Watt (80+ Bronze) – 80$
We need a fast memory to install and run the OS system (windows or linux) and a big memory to save the files.
It is a good option to get 2 different memories:
For the OS we can get a NVMe, which is a really fast SSD drive which can be connected to the PCI express of the motherboard.
I suggest to buy at least a 250gb disk to install the OS sytem.
As second drive, we can by a classic internal Hard Drive. The price is really low and we can get a big memory 2tb for just a bit more then 50 dollars.
- Silicon Power 256GB (NVMe) – 38$
- Seagate Barracuda 2TB (HD 3.5″) – 55$
How to choose the Case?
When choosing the case you need to take into account two factors:
- It is big enough to fit all the components. If you have an ATX motherboard, also the case should be ATX.
- It has a good airflow to keep cool the hardware. Usually nowdays casa have 3 frontal fans which move the fresh air inside the case, and one fan on tha back which takes the hot air out of the case.
- Montech FIGHTER 600 ATX (Midtower case, 4FANS included) – 54$
In conlusion, I suggest you to use this post ad a guideline and search for your own components once you understood why you need them.
Keep in mind that the prices shown here may be different depending on the time you read the post and also depending the country you’re in.
- Train YOLO to detect a custom object (online with free GPU)
- YOLO object detection using Opencv with Python
- Detecting colors (Hsv Color Space) – Opencv with Python
- How to install Python 3 and Opencv 4 on Windows
- Feature detection (SIFT, SURF, ORB) – OpenCV 3.4 with python 3 Tutorial 25
- Check if two images are equal with Opencv and Python
- How to install Dlib for Python 3 on Windows
- Control webcam with servo motor and raspberry pi – Opencv with Python