Hello guys, compliments. I am having issues with d...
# ask-community
l
Hello guys, compliments. I am having issues with deploying from a github repo with .yaml. The process keeps trying to read my local directory instead of the github repo. I get this error message: " 'FileNotFoundError: [Errno 2] No such file or directory: '/Users/lawalidris/Desktop/data_eng/prefect/hello.py' " after running "prefect deploy -n my_github_deployment"
My .yaml file
Copy code
# relevant section of the file:
pull:
- prefect.deployments.steps.git_clone:
    repository: <https://github.com/drisAloma/prefect_flows.git>
    branch: main

# deployment configurations
deployments:
  # base metadata
- name: my_github_deployment
  entrypoint: hello.py:hello_world
  work_pool:
    name: cloud_deploy
    work_queue_name:
    job_variables: {}
  concurrency_limit:
  enforce_parameter_schema: true
  schedules:
  - interval: 30.0
    anchor_date: '2024-12-25T21:55:09.632605+00:00'
    timezone: UTC
    active: false
n
hi @Lawal Idris - looking at
Copy code
'FileNotFoundError: [Errno 2] No such file or directory: '/Users/lawalidris/Desktop/data_eng/prefect/hello.py
it looks like you might be running
prefect deploy
from your
Copy code
/Users/lawalidris/Desktop/data_eng/prefect
directory but the
entrypoint
should be relative to the root of your repo, which from the
pull
step seems to be this repo
Copy code
prefect_flows
so where are you running
prefect deploy
from? it should be run from the root of your
prefect_flows
repo, and then
entrypoint
should be relative to that repo root like these examples
l
Hello Nate, thanks for looking into this. I am running
prefect deploy
from "Users/lawalidris/Desktop/data_eng/prefect" locally.
Do i need to create a root directory locally to replicate the directory on Github, that is "prefect_flows/hello.py"?
Also, using a python script instead of .yaml works when i run it from that directory
Copy code
from prefect import flow

if __name__ == "__main__":
    flow.from_source(
        source="<https://github.com/drisAloma/prefect_flows.git>",
        entrypoint="hello.py:hello_world",
    ).deploy(
        name="my_github_deployment",
        work_pool_name="cloud_deploy",
        parameters={"goodbye": True, "name":"Lawal"}
    )
Hello Nate Please can you check this when you are available
Also, I am having an issue exposing perfect server running in a VPS to my local machine, I've been chatting with the bots for hours but can't seem to get ahead. Update: Resolved