Tony Yun
08/31/2021, 8:35 PMstorage = Docker(
dockerfile="./Dockerfile"
)
But the register always report the module not exists.
ModuleNotFoundError: No module named 'criteo'
Tony Yun
08/31/2021, 8:36 PMKevin Kho
criteo
to be installed as it runs your Python code. Do you have it installed on registration side?Tony Yun
08/31/2021, 8:49 PM$ docker run -it test_criteo /bin/bash
root@ec16afad30d8:/app# python -c "import criteo"
Tony Yun
08/31/2021, 8:51 PMKevin Kho
pip show criteo
give you?Tony Yun
08/31/2021, 8:53 PMroot@5d226792ed82:/app# pip show criteo
WARNING: Package(s) not found: criteo
Tony Yun
08/31/2021, 8:54 PMTony Yun
08/31/2021, 8:56 PM[tool.poetry]
packages = [
{ include = "utils" },
{ include = "criteo" },
]
poetry install
Kevin Kho
pip show mypackage
Name: mypackage
Version: 0.1
Summary: UNKNOWN
Home-page: UNKNOWN
Author: UNKNOWN
Author-email: UNKNOWN
License: UNKNOWN
Location: /Users/kevinkho/Work/demos/blogs/prefect-docker/docker_with_local_storage
Requires: prefect
Required-by:
Kevin Kho
python
and then import criteo
in the terminal?Tony Yun
08/31/2021, 8:59 PMTony Yun
08/31/2021, 9:00 PMmypackage
built using this repo that you shared earlier?
https://github.com/kvnkho/demos/tree/main/blogs/prefect-docker/docker_with_local_storageKevin Kho
Tony Yun
08/31/2021, 9:01 PMKevin Kho
which prefect
and show me the output?Tony Yun
08/31/2021, 9:05 PM/usr/local/bin/prefect
Kevin Kho
Tony Yun
08/31/2021, 9:06 PMKevin Kho
Tony Yun
08/31/2021, 9:10 PMKevin Kho
Tony Yun
08/31/2021, 9:15 PMTony Yun
08/31/2021, 9:15 PMKevin Kho
Tony Yun
08/31/2021, 9:17 PMTony Yun
09/01/2021, 6:24 PM(flow built with '3.8.2', currently running with '3.7.11')
My dockerfile is:
FROM prefecthq/prefect:0.15.4-python3.7
WORKDIR /app
COPY . .
RUN pip install -e .
My python version is also 3.7.11. Don’t where the 3.8.2 comes from.Kevin Kho
Tony Yun
09/01/2021, 6:26 PMTony Yun
09/01/2021, 6:27 PMTony Yun
09/01/2021, 6:28 PMTony Yun
09/01/2021, 6:29 PMTony Yun
09/01/2021, 6:34 PMKevin Kho
flow.register()
or prefect CLI?Tony Yun
09/01/2021, 6:37 PMregistry_url
added in DockerStorage. I thought I don’t need it to succeed since I’m using local Agent.Tony Yun
09/01/2021, 6:38 PMKevin Kho
Tony Yun
09/01/2021, 6:38 PMKevin Kho
Tony Yun
09/01/2021, 6:39 PMTony Yun
09/01/2021, 6:39 PMTony Yun
09/01/2021, 6:39 PMKevin Kho
Tony Yun
09/01/2021, 6:41 PMKevin Kho
prefect agent docker start
😆. DockerRun pairs with Docker agent. Are you using KubernetesRun? That would pair with the Kubernetes agentTony Yun
09/01/2021, 6:42 PMTony Yun
09/01/2021, 6:42 PMTony Yun
09/01/2021, 6:43 PMKevin Kho
Tony Yun
09/01/2021, 6:45 PMKevin Kho
Tony Yun
09/01/2021, 8:29 PMEvent: 'Failed' on pod 'prefect-job-bfd2714e-vqgcj'
Message: Failed to pull image "criteo-report:2021-09-01t20-22-23-258252-00-00": rpc error: code = Unknown desc = Error response from daemon: pull access denied for criteo-report, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
My agent:
prefect agent kubernetes install | kubectl apply --namespace=default -f -
prefect agent kubernetes start
[2021-09-01 20:21:53,363] INFO - agent | Waiting for flow runs...
[2021-09-01 20:24:52,971] INFO - agent | Deploying flow run 57edb152-75f6-4b23-8c56-3cf4af2133d5 to execution environment...
[2021-09-01 20:24:53,184] INFO - agent | Completed deployment of flow run 57edb152-75f6-4b23-8c56-3cf4af2133d5
My flow:
with Flow(
name="Criteo Report",
storage=storage,
run_config=KubernetesRun(image="criteo-report:latest"),
executor=LocalExecutor()
Tony Yun
09/01/2021, 8:31 PMrepository
which I don’t know how to push the container toKevin Kho
Tony Yun
09/01/2021, 8:43 PMKevin Kho
Tony Yun
09/01/2021, 8:44 PMKevin Kho
Tony Yun
09/01/2021, 8:45 PM