Please, share your entrypoint, otherwise we can only guess. It is not clear what you mean by variables as I don’t see any reference to variables in your post. If you create the entrypoint properly, everything will run before your python app which is the argument of the entrypoint.
When you share code, use code blocks as mentioned in the below topic: