Constantino Schillebeeckx
08/03/2021, 5:22 PM.py
file? we've split out commonly shared functionality between flows into an e.g. utils.py
file which is referenced in the flow. given all the storage documentation this design doesn't seem to fit into the intended use of storage.Kevin Kho
utils.py
does not change often, you can have it as a Python module inside your Docker container and then store your flow somewhere else like S3. S3 + DockerRun will pull the flow from S3 and run it on top of the specified container. This way, you won’t have to keep rebuilding containers.Constantino Schillebeeckx
08/03/2021, 5:30 PMutils.py
, reference this container in my ECSRun, and then use S3 for just the flow's workflow.py
which is able to e.g. import utils
?Zanie
Constantino Schillebeeckx
08/03/2021, 5:37 PMKevin Kho
Constantino Schillebeeckx
08/03/2021, 5:45 PMModuleNotFoundError("No module named 'pipelines.custom_docker'")
when I've since removed all references to that line of code, pushed new containers and re-registered the flowKevin Kho
Constantino Schillebeeckx
08/03/2021, 5:51 PMKevin Kho
Constantino Schillebeeckx
08/03/2021, 5:51 PMKevin Kho
Constantino Schillebeeckx
08/03/2021, 5:51 PMAs in ECSRun and Github storage?correct
Constantino Schillebeeckx
08/05/2021, 6:45 PMFailed to load and execute Flow's environment: ModuleNotFoundError("No module named 'flows.custom_docker'")
When I pull that docker image down, it seems like that module does exist:Kevin Kho
pip
or conda
?Constantino Schillebeeckx
08/05/2021, 6:46 PMKevin Kho
Constantino Schillebeeckx
08/05/2021, 6:47 PMKevin Kho
Constantino Schillebeeckx
08/05/2021, 6:48 PMKevin Kho
Constantino Schillebeeckx
08/05/2021, 6:52 PMConstantino Schillebeeckx
08/05/2021, 6:55 PMKevin Kho
pip install .
instead of the python setup.py install
to make sure? Is ./flows
everything in your package?
I don’t believe there should be caching if you are running as a task with Fargate/ECS. If you did on EC2 then there might be, but you could tag to be explicitly sure?
How did you test the container to see if you could import? You downloaded your image and then used exec
?Constantino Schillebeeckx
08/05/2021, 7:02 PMpip install .
. Yep, ./flows
is all my code; that's what setup.py referencesConstantino Schillebeeckx
08/05/2021, 7:02 PMdocker run -it --rm 864 /bin/bash
Kevin Kho
Constantino Schillebeeckx
08/05/2021, 7:05 PMConstantino Schillebeeckx
08/05/2021, 7:05 PMConstantino Schillebeeckx
08/05/2021, 7:18 PMpip install .
- I'm guessing there's something wrong with my setup.py
For the time being I've worked around it with the following in my DockerfileKevin Kho
Constantino Schillebeeckx
08/05/2021, 7:20 PMKevin Kho
packages=find_packages()
instead of ['flows']
, but this would require ___init__.py_
files i think in those subdiractoriesKevin Kho
python setup.py bdist_wheel
, and then extract the wheel and examine the contents to see if everything is in there.Constantino Schillebeeckx
08/05/2021, 7:24 PM__init__.py
only in the highest level dirConstantino Schillebeeckx
08/05/2021, 7:26 PMConstantino Schillebeeckx
08/05/2021, 7:27 PMKevin Kho
find_packages()
get them? Are you python versions the same? At least we know the culpritConstantino Schillebeeckx
08/05/2021, 8:03 PMfind_packages()
and then having an __init__.py
in every subdirKevin Kho