This is a three step process. First, download the required packages on a machine with internet access. Then, copy files over to the server with no internet access using scp or through a bastion host. Finally, run the pip install command to use local files.
pip download -r ./requirements.txt -d "dependencies"
This will download all the required packages to a local folder called
dependencies