Setup environment for model