This paper studies the precoding design to maximize the throughput of millimeter wave (mmWave) multiple-input multiple-output (MIMO) systems with blocked direct communication paths. In particular, we enhance MIMO transmission by using reconfigurable intelligent surfaces (RIS) considering mmWave characteristics related to line-of-sight (LoS) and multipath effects. The conventional exhaustive search (ES) for optimal codewords under continuous phase shifts is computationally intensive and time-consuming. To reduce the computational complexity, the permutation discrete Fourier transform (DFT) vectors are used for codebook design by incorporating amplitude responses for real or ideal RIS systems. However, even if the discrete phase shift is adopted for ES, it requires significant computation and is time-consuming. Instead, we develop a trained deep neural network (DNN) for faster codeword selection. Simulation results show that the DNN maintains suboptimal spectral efficiency even when the distance between the end user and the RIS changes during the test phase. These results highlight the potential of DNNs in the advancement of RIS-enabled systems.