Sanjay Patel
04/17/2020, 3:25 AMFlow
needs a storage
keyword and that storage needs to create a Docker
instance with a dockerfile
keyword. I have tried this on a very basic example passing a dockerfile and I keep getting the same error 500 Server Error: Internal Server Error ("Cannot locate specified Dockerfile: .\tmp64wpj0sv\Dockerfile")
after I execute flow.register()
Simple example was taken from tutorial and my dockerfile is located in the same location (note i'm pretty certain it can find the file as I get a different error message if the file can't actually be located)
import prefect
from prefect import task, Flow
from prefect.environments.storage import Docker
@task
def hello_task():
logger = prefect.context.get("logger")
<http://logger.info|logger.info>("Hello, Cloud!")
flow = Flow("hello-flow", tasks=[hello_task])
flow.storage = Docker(dockerfile = 'Dockerfile')
flow.register(project_name="hello-flow")
Dockerfile content:
FROM ubuntu:18.04
Any assistance on how I should actually be specifying my dockerfile to add the required modules to my actual workflow is appreciated
Thanksnicholas
04/17/2020, 3:46 AMdockerfile = 'Dockerfile'
from your code and this should build in a tmp directory locally.Sanjay Patel
04/17/2020, 1:10 PMregister()
the flow using a Docker container was one issue (giving the module not found error) and the other issue was if it successfully registers, but fails with a 'module not found' error when running through the UI / CLI then it's a different issue with environments