Kamal
01/19/2024, 9:41 PMFlow could not be retrieved from deployment.
Traceback (most recent call last):
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/tmp/tmpwp9f0k88prefect/branch/src/flows/simpletest_git_p2/simpletest_git_p2.py", line 12, in <module>
from botocore.exceptions import ClientError
ModuleNotFoundError: No module named 'botocore'
Its running fine once I commented out the package botocore . I saw an option env, but i don't know how / where to write. Dockerfile is also in the git repo. I do have a docker image with all required pip list. Below is the code used .
if __name__ == "__main__":
simpletest_git_p2.from_source(
source=GitRepository(
url="<https://github.cms.gov/gitrepo.git>",
branch="branch",
credentials={
"access_token": Secret.load("github-access-token")
}
),
entrypoint=f"src/flows/{flow_name}/{flow_name}.py:{flow_name}",
).deploy(
name="private-git-storage-deployment",
work_pool_name="workpool",
build=False
)
Kamal
01/19/2024, 9:45 PMKamal
01/19/2024, 9:46 PMNate
01/19/2024, 10:29 PMif you're not building an image that has your dependencies, where is your image that's used at runtime coming from?Copy codebuild=False
Kamal
01/19/2024, 10:30 PMKamal
01/19/2024, 10:30 PMKamal
01/19/2024, 10:31 PMKamal
01/19/2024, 10:31 PMNate
01/19/2024, 10:32 PMfrom prefect.deployments import DeploymentImage
if __name__ == "__main__":
simpletest_git_p2.from_source(
source=GitRepository(
url="<https://github.cms.gov/gitrepo.git>",
branch="branch",
credentials={
"access_token": Secret.load("github-access-token")
}
),
entrypoint=f"src/flows/{flow_name}/{flow_name}.py:{flow_name}",
).deploy(
name="private-git-storage-deployment",
work_pool_name="workpool",
build=True,
image=DeploymentImage(dockerfile="Dockerfile.mine", image="repo/image_name:tag")
)
Kamal
01/19/2024, 10:33 PMKamal
01/19/2024, 10:46 PMNate
01/19/2024, 10:47 PMbuild=True,
Kamal
01/19/2024, 10:47 PMNate
01/19/2024, 10:47 PMRaffaele Scarano
01/22/2024, 11:55 AMRaffaele Scarano
01/22/2024, 11:56 AMKamal
02/06/2024, 4:20 PMRaffaele Scarano
02/06/2024, 4:21 PMKamal
02/06/2024, 4:28 PM