8000 GitHub - milanmlft/prefect-docker-poc: Experimenting with a dockerised run being called from prefect using local process workers.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

milanmlft/prefect-docker-poc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prefect proof of concept

Trying to get the simplest version of experimenting with a dockerised run being called from prefect using local process workers. Covers the main areas that we'd want to be sure of before investing real effort into incorporating real workflows into prefect.

The prefect-poc/README.md has a checklist of areas of investigation and their implementation in the code.

From prefect-poc sub directory

export PREFECT_SERVER_API_AUTH_STRING="admin:pass"
export PREFECT_API_AUTH_STRING="admin:pass"
uv run prefect server start

Navigate to http://localhost:4200/dashboard and login using the string.

In a new screen/terminal session add a worker:

export PREFECT_API_URL=http://localhost:4200/api
export PREFECT_API_AUTH_STRING="admin:pass"
uv run prefect worker start --pool 'poc-worker' --type process --limit 2

In another screen/terminal, load config for three versions of the run_docker flow:

export PREFECT_API_AUTH_STRING="admin:pass"
export PREFECT_API_URL=http://localhost:4200/api
uv run python src/prefect_poc/run_docker.py

Now that we have the flow configuration, deploy them. You should see some concurrency limit hit in the logs

export PREFECT_API_AUTH_STRING="admin:pass"
export PREFECT_API_URL=http://localhost:4200/api
uv run prefect deployment run 'run-docker/first'
sleep 5 
uv run prefect deployment run 'run-docker/second'
sleep 5 
uv run prefect deployment run 'run-docker/third'

Add another worker to the worker pool

export PREFECT_API_URL=http://localhost:4200/api
export PREFECT_API_AUTH_STRING="admin:pass"
uv run prefect worker start --pool 'poc-worker' --type process --limit 2

About

Experimenting with a dockerised run being called from prefect using local process workers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 84.3%
  • Dockerfile 15.7%
0