Is it possible to have <Multiple Python environmen...
# dagster-plus
l
Is it possible to have Multiple Python environments on cloud serverless deployment?
d
Hi Levan - this is possible with a bit of configuration in the CI/CD that we'd be happy to help you with. You'd have multiple requirements.txt files (or multiple github repositories), and build a different image with a different set of requirements for each code location
l
Sounds great! Do you have some example snippet I could use?
d
Is this two folders within a single GitHub repo? Or do you have a separate GitHub repo for the other python environment?
l
two folders within single repo
d
Sorry i meant to comment on your other post 🙂
So the way I think that should work is something like this in your `dagster_cloud.yaml`:
Copy code
locations:
  - location_name: example_location
    code_source:
      package_name: my_dagster_project
    build:
      directory: ./my-dagster-project

  - location_name: other_location
    code_source:
      package_name: my_other_dagster_project
    build:
      directory: ./my-other-dagster-project
(with different requirements.txt and setup.py etc. in two different folders in the github repo). That said, while testing that I think I found a small bug that's causing the two built images to clobber each other, we'll get a fix out for that shortly at which point this pattern should work.
l
Awesome! Looking forward to that.
d
That issue is fixed now - the config I posted above should work
🤩 1
l
Awesome! 🎉 Thanks!
d
^^ just ninja-edited the config above to make it a bit simpler, it had a working_directory in there that it didn't need
👌 1