Gregory Hunt
06/13/2023, 8:26 PMalex
06/13/2023, 8:28 PMprefect.yaml
file and the prefect deploy
command that you’re running?Gregory Hunt
06/13/2023, 8:29 PMdefinitions:
actions:
docker_build: &docker_build
- prefect_docker.projects.steps.build_docker_image: &docker_build_config
requires: prefect-docker>=0.2.0
image_name: prefect-default
tag: dev
dockerfile: Dockerfile.default
push: false
deployments:
- name: my-first-deployment
version: null
tags: ["test"]
description: "Basic Local Deployment"
schedule: {}
entrypoint: ./src/flows/basic-flow.py:pipeline
parameters: {}
work_pool:
name: localwork
- name: my-first-docker-deployment
version: null
tags: ["docker"]
description: "Basic Docker Deployment"
schedule: {}
entrypoint: ./src/flows/basic-flow.py:pipeline
parameters:
path: /home/prefect
work_pool:
name: docker-work
job_variables:
image: 'prefect-default:dev'
build: *docker_build
Gregory Hunt
06/13/2023, 8:29 PMGregory Hunt
06/13/2023, 8:29 PMFileNotFoundError: [Errno 2] No such file or directory: '/Users/ghunt/code/particlehealth/proton/prefect'
Gregory Hunt
06/13/2023, 8:30 PMFROM prefecthq/prefect:2.10.13-python3.9
LABEL description="Prefect CloudRun default"
RUN mkdir /home/prefect
COPY src /home/prefect/src
Gregory Hunt
06/13/2023, 8:30 PMalex
06/13/2023, 8:32 PMprefect.yaml
look like? I think your pull
step may need to be updated.Gregory Hunt
06/13/2023, 8:32 PM# File for configuring project / deployment build, push and pull steps
# Generic metadata about this project
name: prefect
prefect-version: 2.10.13
# build section allows you to manage and build docker images
build: null
# push section allows you to manage if and how this project is uploaded to remote locations
push: null
# pull section allows you to provide instructions for cloning this project in remote locations
pull: null
alex
06/13/2023, 8:35 PMmy-first-docker-deployment
that looks like this:
pull:
- prefect.projects.step.set_working_directory:
directory: /home/prefect
That will ensure that your flow run gets kicked off from the correct directory.Gregory Hunt
06/13/2023, 8:39 PMGregory Hunt
06/13/2023, 8:41 PMGregory Hunt
06/13/2023, 8:42 PMGregory Hunt
06/13/2023, 8:43 PMalex
06/13/2023, 8:49 PMwork_pool
section to look like this:
work_pool:
name: docker-work
job_variables:
image: '{{ image_name }}'