Last active
February 27, 2019 16:23
-
-
Save cicdw/16246401f498999702ef9f2b92b42a15 to your computer and use it in GitHub Desktop.
Create Prefect environment and deploy Flow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from prefect.environments import DockerEnvironment | |
env = DockerEnvironment( | |
base_image="python:3.6", | |
registry_url="XXXXXXXX", | |
python_dependencies=["google-cloud-firestore"], | |
files={"~/google-creds.json": "/root/google-creds.json"}, | |
env_vars={"GOOGLE_APPLICATION_CREDENTIALS": "/root/google-creds.json"}, | |
) | |
flow.environment = env | |
# builds the Docker image and pushes Flow metadata to the Prefect Cloud database | |
flow.deploy(project_name="marvin") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment