I am very new to python and learning about the virtual environment. I understand that I am supposed to have all the libraries installed in the virtual environment and create the requirement.txt
, so others can install using that. However, I am not sure what the best practice to deploy to production?
The reason I ask is that no one supposes to have access to the production environment, the deployment is through a predefined pipeline, and my understanding is that it will zip all my code and deploy it to production, no one suppose to go into production to do any manual work. I can try to get the pipeline to run a script to install all the libraries base on the requirement.txt, but I am not sure if the firewall setting is the same. Should I package the libraries as well?
Also, how should I trigger the python script? Should I have a wrapper script to activate the vevn before calling python script and deactivate it after? Or there is a easier way?