I'm not entirely sure that this is what you're asking, and hopefully a religious scholar will come along to dunk on me before long, but I would say that there are clear antecedents to Christian monasticism, traditions that bear some resemblance to later monastic life.
In certain respects, several pre-Christian philosophies, notably Stoicism, Cynicism, and Pythagorean mysticism resembled later monastic movements, involving, in varying degrees, asceticism, communal living, and an emphasis on spiritual/mystical/philosophical pursuits. Early Christian scholars would have been aware of these philosophers to some degree.
More directly relevant are the groups of Jewish ascetics that emerged in the Second Temple Period. The Essenes lived on the shore of the Dead Sea, observed celibacy, communal living, voluntary poverty, silence, and other aspects of ascetic practice. They had been practicing this lifestyle since around 150 BCE, and were first observed by Pliny the Elder in his Natural History (c. 79 BC), who wrote:
Along the West Coast retire the Esseni: a Nation living alone, and beyond all others throughout the World wonderful: without any Women, casting off the whole of Venus: without Money : keeping company only with Date-Trees.
(The translator of the edition of Pliny that I am reading says in his footnote that they are "devoted...wholly to meditation...exceedingly abstentious...highly exemplary in their moral deportment")
Philon of Alexandria also writes about a community of Jewish ascetics called the Therapeutae that resided near Lake Mariout who had abandoned family and possessions to live a life of seclusion and reflection:
On this account they eat only so far as not to be hungry, and they drink just enough to escape from thirst, avoiding all satiety, as an enemy of and a plotter against both soul and body... in short they practise entire simplicity, looking upon falsehood as the foundation of pride, but truth as the origin of simplicity, and upon truth and falsehood as standing in the light of fountains, for from falsehood proceeds every variety of evil and wickedness, and from truth there flows every imaginable abundance of good things both human and divine.
Philon called them cenobites, living a lifestyle that strongly resembled later Christian cenobitic monasteries.
Other writers (and mind you, this is controversial), see the influence of Manichaeism, especially the emphasis on dualism, a rejection of the flesh and sexuality, and the separation of society into groups, on early Christian monks, notably Augustine.
As you might imagine, this is a topic of some contention among religious scholars, and from my understanding, the consensus is that early Christian monks did not draw directly from these traditions, but I do think it is fair to look at these communities as antecedents to Christian monasticism.
Sources:
Pliny, Historia Naturalis, V, 17 or 29
Philo, De vita contemplativa , IV. (34)
antecedents
Clarification: Several Eastern monastic traditions predate Christianity, but are not really antecedents in that they are completely independent. Should we assume that you are asking only about the West/Mediterranean/Europe?
I have a somewhat unorthodox view on this so I will try to be hedgy, but broadly speaking there are several precursors that one could point to in various Mediterranean societies, but all of them lack elements that are central tenants of monasticism. What is strikingly similar to Christian monasticism is Buddhist monasticism, which had developed centuries before the birth of Jesus and was widespread throughout India and areas touched by its cultural influence. I will circle back around, but first I wanted to bring up a few possible examples and explain why I think they can't be considered progenitors.
The first and oldest would be the "wild man" tradition that can be seen as far back as the Epic of Gilgamesh, in which a man forsakes civilization and comes to be like a beast out in the wilderness. I am sort of setting this up as a straw man because I don't think anyone would take this as a true precedent given that it tends to be pretty explicitly negative, but it does go t show that the idea of voluntarily exiting society does go far back indeed.
Another one people might point to are the cynics, a Greek philosophical "school" which involved the rejection of material goods and living "like a dog". The key difference here is that the cynics were intensely worldly, rejecting riches not out of spiritual ideals but out of a sense of freedom. They were thus deeply engaged with civic life, the tales of Diogenes found in Diogenes Laetius are not about him contending with inner battles or dangers of the wilderness, but rather mocking and belittling the great people of the day.
Leaving the Greco-Roman tradition, a third possibility might be the Essenes, a Jewish community that practiced communal living somewhat reminiscent of utopian communes of more recent times. There are some superficial similarities there in the value placed on piety, rejection of social distinction, and behavioral regulation, but there are some issues, the first of which is the problem of transmission. This is a bit of a tricky issue in the ancient context because we can only understand a fraction of what was actually going on in a given society, but the Essenes seem to have been pretty specific to a time and place and there is no reason to think they spread outside of Judea. But more deeply, while the Essenes seem to have been based around the notion of a new society centered on piety, that is not the same as the rejection of society that monasticism implies. There is nothing unworldly about the Essenes living.
With those three as examples of how I think things brought up as precursors do not actually work very well as such, I will briefly touch on the remarkable similarity of Christian monasticism before detailing transmission (which I find most interesting). Primarily, this is in basic structure: in both cases the monasteries are made up of groups of people who have “consciously” rejected the world (scare quotes because in both cases children make up the primary source of membership) to live their life devoted to a transcendent, unworldly ideal. They do so through strict behavioral regulation that typically includes celibacy, dietary restrictions and rejection of worldly possessions. Despite this, in both cases the monasteries were dependent on communal donations and commerce, and could often become wealthy landowners in their own right. Aside from these structural similarities, there is a real ideological similarity in that in both cases they are devoted to the highest ideal with single minded focus. So that seems similar and all, but what about transmission? India is, after all India and quite far from where Christianity started. However, by all accounts the birthplace of Christian monasticism was in Egypt, generally the story starts with the desert fathers, hermits who rejected the world to live in, well, the desert by themselves (a sort of deliberate martyrdom) until St. Anthony who took disciples who shared his devotion and style of life. The key detail here is Egypt, because not only was Egypt a place with readily accessible desert, but it was also the primary entry point for trade with India, which was massive enough to maintain multiple ports along the Red Sea. With this trade came people going in both directions--traces of Indian merchants have been found in those Red Sea ports and the Nile entrepot of Coptos, and there are accounts of Romans hitching rides with the merchants to see the land of India.
Connected to this is a much older thread that goes back to classical Greece but particularly Alexander the Great, who conquered his way all the way to India (well, modern Pakistan) and, while there, engaged in some learning about the land somewhat reminiscent of Napoleon. In particular, accounts have him in philosophical discussions with Indian holy men, and one of them, Calanus, accompanied Alexander back and later committed suicide by immolation in an act of philosophical self control, which was highly impressive to the Greeks. Lter writers did not forget them, and they pop up again and again in classical literature and India became a fount of mystic wisdom in a way not unlike how it is seen today.
So in short, if you were an educated holy man and wanted a model of conspicuously holy behavior, India provided several known examples, and if you were in Egypt you had ready information about Buddhist monasticism, perhaps even direct contact with Buddhist holy men. Given the similarities between the two, I find it quite likely that there is a real connection there.
A source for India in Roman Egypt is Sidebotham’s Berenike, for the history of India within ancient thought there is Parker’s Making of Roman India. The similarities between the two is something I (and plenty others) have noticed but I think this paper does a good job laying out the deep ideological affinity. For the life of me I have not been able to find recent academic work on this (although anecdotally plenty of people working on related topics have mentioned its plausibility), the closest I have been able to find is an offhand mention that it was apparently a topic of some contention in German academic work.