Generating metadata without internet

I would like to use Nexus in isolated environment (without internet connection, local network).
I am using only HOSTED type of repos and this formats: YUM, PYPI, APT, RAW, Docker.

Does anyone have any experience how metadata is generated, does it need connection to the internet or it can be created offline.

I had some problems with pip metadata, Simple files for specific package (Simple directory on pypi repo) are only created when you download specific package (example, first time when I download ansible package from pip, metadata for ansible is created) and it only happens if nexus is connected to the internet. If it does not have connection to the internet (and simple file for ansible is not yet been created) and I try to install package ansible with pip I get error “Could not find a version that satisfies the requirement ansible”.
I tried to rebuild metadata with “Rebuild index” but did not help.

I am using nexus version 3.30.1 and run it in docker container.