Build your own deep learning box — Hardware assembly
This series is a step-by-step walk-through on how to build a GPU tower dedicated to train deep neural nets.
- Part 1: Bill of materials
- Part 2: Hardware assembly
- Part 3: Software installation
- Part 4: Benchmarking and ongoing commentary
The good news is that the hardware assembly procedure is not complicated. The bad news is that botching it up is easy and very costly. So it pays to prepare well; read all the product manuals twice over and watch as many YouTube videos as you can before starting the build.
This one helped me the most:
The motherboard manual provides the complete installation sequence. Specific instructions for individual components can be obtained from their manuals and YouTube videos. The overall and generic installation sequence is as follows;
- Install CPU and cooler on motherboard.
- Install memory on motherboard.
- Install power supply in case.
- Install motherboard in case.
- Install storage.
- Install graphics card.
- Install Wi-Fi card.
- Connect everything inside the case.
- Connect monitor, keyboard and mouse.
- Connect power supply to wall outlet.
- Conduct Power On Self Test.
- Boot and review BIOS configurations.
- Proceed to OS installation.
What can go wrong?
- The CPU cooler installation is easily the most risky step in the procedure. Incorrect installation will lead to improper heat transfer, CPU instability and ultimately breakdown. Even though I installed the AMD Ryzen stock cooler, the procedure was surprisingly hard and not documented very well. Clean up and reapply thermal paste to top of the CPU, if you have made too many failed attempts. I installed mine in 3 attempts, did not reapply any paste, and now pray to the Almighty before every boot.
- Motherboard power supply connections are the next biggest risk item. Once the power supply cables are plugged in to the motherboard, it is not easy to pull them out and pulling too hard can break the motherboard. So it is best to do it right the first time.
- Other motherboard connections for LEDs, USB, FANs and so on require good vision and fine motor skills. It is also easy to bend these motherboard connector pins. Double check the pins, orientation and apply force with extreme care. Recommend using a magnifying glass.
- Static electricity discharges can damage your components. Use techniques recommended in your motherboard manual to dissipate static. I used this anti-static bench mat and grounded it to the metal part of my workbench. See here for a technically correct usage.
- Hold components by the side, do not leave fingerprints on the body especially the CPU.
- The motherboard and PCB on the top of the GPU have the highest density of fine electronics. If you drop the screwdriver on them, the outcome is not likely to be good. So let your spidey-sense tingle when working around those areas.
Getting on with it
Caution: The steps below are relevant only for my particular bill of materials. At best this is a recounting of one person’s experience and not intended to replace official product manuals and instructions.
Step 0: Prepare the workbench
- Place anti-static mat on workbench and connect it to ground.
- Verify tools — Phillips screwdriver, magnifying lens, compressed air duster, scissors.
- Verify supplies — thermal compound, cable ties.
Step 1: Install CPU on Motherboard
This is literally a snap-in. I am listing the steps here for the sake of completeness. It is best to watch the official AMD product video.
- Raise metal retention arm.
- Match the triangular notch on under-side of the CPU with the triangular notch on the CPU slot on the motherboard.
- Drop the CPU on the motherboard CPU socket with AMD Ryzen logo facing the top-side.
- Lower the retention arm.
Step 2: Install CPU cooler on Motherboard
This in my view is the riskiest task in the entire procedure. Yet the official AMD product video skims over installation of the stock cooler. This youtuber has done a nice job of explaining it. I have added some details based on my difficulties with the cooler.
- Orient the cooler such that the metal ear-ring on the side with AMD logo faces north on the motherboard and the other ear-ring faces south. (Disclosure: I ended up installing it upside down. Based on forum discussions on Tom’s hardware this does not appear to be a problem).
- Lower the cooler tilted slightly towards the south-side of motherboard and engage south-side ear-ring with protrusion on the bracket.
- Then tilt cooler north-ward and engage bracket on north-side. The north-side ear-ring also has a locking lever. Turn the lever from east to west (left to right depending on your perspective). Push to lock (some force is required to lock the lever — just use your thumb and not a hammer).
- Connect the big cooler cable to the CPU_FAN port on the motherboard.
- Connect the cable with 4-pin connectors to 4-pin port on cooler and the RGB_HEADER2 port on the motherboard. This lights up the LED on top of the cooler fan.
- (Optional) Connect the 3-pin USB connector to one of the USB headers on motherboard (USB1112 or USB1314) . This is for more fine-grained control of the cooler fan LED colors.
Step 3: Install memory in motherboard
- Install memory cards as per motherboard instructions.
- If you are not using all the slots, make sure to install the memory on primary slots (in my case they were A2 and B2).
- Make sure to orient the card so the notch on the card aligns with the notch on the DDR4 slot.
- Apply just enough pressure to hear the card click into place at the bottom and top.
Step 4: Install power supply in case
- Unscrew and remove the side covers from case. Remove accessories.
- Install connectors for motherboard, CPU and GPU (PCI-E) (connect only to the power supply box and not to the motherboard)
- Insert the power supply box into case and screw it in.
Step 5: Install motherboard in case
- Place case on its side on the workbench.
- Install stand-offs inside the case. The stand-offs are little screws with long hexagonal heads, that help maintain a gap between the back of the motherboard and the case body.
- Place motherboard with CPU/cooler unit inside the case and align holes on motherboard with the holes on the standoffs.
- Secure the motherboard to the case using the screws that came with standoffs.
- After ensuring motherboard is securely attached to case and CPU cooler is attached securely to the motherboard, bring the case to its upright position.
Step 6: Install M.2 SSD
- Install M.2 SSD as per motherboard instructions.
- Install spacer provided with motherboard.
- Slide in the SSD pins into M.2 socket.
- Lock it in place using screw provided with spacer.
Step 7: Install graphics card
- Remove the metal covers covering the PCI-E expansion slots on the case. I had to remove 3 covers to make room for my GPU.
- My GPU came with a sheath to protect the connector pins and plastic wrap on the underside. Make sure to remove these before installing the GPU.
- Consult your motherboard manual to figure out which of the PCI-Ex16 slots to use for the primary GPU. I installed mine on the top-most slot.
- Align notches on the GPU pin and PCI-E slot. Slide in the GPU gently until you hear a click.
- Reinstall in the expansion slot thumbscrews to secure the GPU in place.
- Connect the 6+2 connector from power supply
Step 8: Install Wi-Fi adapter
- Similar to GPU card, unscrew and remove one of the expansion slot covers.
- Slide in the Wi-Fi adapter card into a PCI-E x 1 slot. I installed mine just above the graphics card.
- Reinstall in the expansion slot thumbscrews to secure the adapter in place.
- Assemble and connect the antenna.
Step 9: Install all remaining connectors to motherboard
- Connect 24-pin main power supply connector to the EATXPWR port
- Connect 8-pin CPU power supply connector to the EATX12V port
- Connect case fan connector to CHA_FAN1 port
- Connect case fan LED connector to RGB_HEADER1 port
- Connect case front panel connectors for Power switch, Reset switch, Power LED and HDD LED (These connect to a very tiny set of ports on the motherboard. Easy to cross-wire them, so use of magnifying lens is recommended).
- Connect USB 2.0 and 3.0 connectors.
- Use cable ties to organize the cables as best as you can.
- Route power supply cables through back of the case and pull them out of the slots closest to their corresponding motherboard ports.
Step 10: Connect peripherals
- Connect wired (PS2 or USB) keyboard and mouse to the motherboard (back panel) ports.
- Connect the monitor to the Graphics card HDMI port (not the motherboard HDMI port — if you do not have onboard / integrated graphics card ).
Step 11: Execute Power On Self Test (POST)
- POST is a fancy term for connecting power supply to wall outlet, switch on power and hope nothing blows up.
- If all goes well, BOOT, VGA, DRAM and CPU LEDs will flash some colors and end with green.
So what happened when I did my POST. Absolutely nothing. One LED sticker on the motherboard lit up giving me hope that at least the motherboard was getting power. But other than that — no clues.
After an hour of retracing all installation steps and frantic forum searches, it turned out that I had to switch on power from both PSU and front panel (had forgotten the latter).
If you end up in a similar situation, just remember these two words from my favorite author — DON’T PANIC.
After powering on from both back and front panels, all the fans started spinning and the RGB LEDs lit up. It was a glorious sight. But… POST still failed. BOOT and VGA tests seemed to pass. But DRAM LED stayed lit in yellow indicating memory failure.
After one more hour of searching on forums, it turned out that the bottom part of the memory cards were not inserted fully into the DDR4 slot. After installing memory cards correctly, POST ended successfully in green.
Step 10: Verify BIOS
Once POST completes successfully, follow instructions in motherboard manual to view the BIOS screen (hit DELETE or F2 during power on).
Once in BIOS screen, switch to EZ Mode and verify that the system has recognized your CPU and Memory and is reporting status on CPU and case fans.
For some reason, the BIOS on my motherboard does not report anything about external cards installed on the expansion slots (i.e. Wi-Fi card / Graphics card). But I was able to confirm that both were working correctly after installing OS.
If you have reached here, congratulations! Take a deep bow and move on to Part 3: Software installation.