Plant factories with artificial lighting (PFALs) are heralded as a potential solution to enhance the resilience of the food production system by amplifying productivity per unit area of land. However, PFALs typically demand higher resource consumption than traditional greenhouses or open-field farming. To optimize resource use in PFALs, we developed a nonlinear, automatic control system utilizing deep reinforcement learning (DRL). The proposed system implicitly learns the intricate dynamics of crop behavior and environmental variables, aiming to curtail resource, particularly energy consumption in PFALs, while ensuring that these environmental variables stay within desired operating parameters. We demonstrate the efficacy of the proposed DRL-based automatic control system through a case study: a shipping container PFAL situated in Ithaca, New York. We evaluate the ability of the proposed DRL system to reduce energy consumption by comparing its energy consumption to that of the conventional control method. Our findings indicate that, in typical Ithaca summer and winter conditions, the DRL-based control system can potentially decrease energy consumption by about 31 % and 23 % compared to the conventional control method.