python conda deployment on server

896 Views Asked by At

Let say I have two projects that I develop on my personal machine. I use conda to manage my python dependencies. I created environments to manage these projects. When I'm done with the dev, I want to export them to a remote machine that will run regularly, in the same time, these two projects. How should I manage this deployment ?

1

There are 1 best solutions below

0
On BEST ANSWER

After some researches, I came up with this:

  • clone your environments as described on conda's doc.
  • export your environment file on the server along with your project.
  • import the environment on the server's conda.
  • create a bash script like that

#!/bin/bash source activate my_environment python ~/my_project/src/code.py

  • set up cron as usual calling this previous bash script