  Motivated by the recent work on conditional risk measures, this paper studies
the Ekeland's variational principle for a proper, lower semicontinuous and
lower bounded $\bar{L}^{0}-$valued function, where $\bar{L}^{0}$ is the set of
equivalence classes of extended real-valued random variables on a probability
space. First, we prove a general form of Ekeland's variational principle for
such a function defined on a complete random metric space. Then, we give a more
precise form of Ekeland's variational principle for such a local function on a
complete random normed module. Finally, as applications, we establish the
Bishop-Phelps theorem in a complete random normed module under the framework of
random conjugate spaces.
