We investigate using machine learning techniques to infer various physical properties of rocks from hyperspectral imaging data. In particular, we demonstrate that deep neural networks (DNN) can infer mechanical and geochemical properties based on high-resolution Fourier transform spectrograms. Our goal is to enable real-time petrophysical analysis of subsurface rocks and fluids. The ongoing work encompasses the development of sensors and algorithms that facilitate nondestructive, fast, and high-resolution mapping of petrophysical properties. We acquired high-resolution mappings of mechanical, chemical, and electromagnetic properties at sub-millimeter scale (> 100 um) using a scanning system fitted with multiphysics probes, including impulse hammer geomechanical probe designed to measure the rebound hardness and the reduced Young modulus; Fourier transform spectrometer (FTIR) to acquire the diffuse reflectance; acoustic transducers to measure unconstrained sonic velocities; and near-surface gas permeability. We have characterized over two hundred thousand samples across various lithologies, including limestone, sandstones, and shales from outcrops and cores from unidentified wells. We present the results of machine-learning models and algorithms that predict, based on the IR reflectance data, the rock types, and the unconstrained geomechanical properties. The method could be extended to characterize other solids from subsurface, terrestrial, or non-terrestrial environments. The combination of photonic measurements and machine learning provides the means to find non-causal relations between materials' electromagnetic/photonic response and their other physical properties under various stress states and environmental configurations. This work presents the foundational blocks to achieve this objective and develop optical sensors for sustainable energy extraction.