Mitch
10/03/2023, 6:13 PMMarvin
10/03/2023, 6:13 PMprefect cloud login
.
Next, you're going to want to load in your PREFECT_API_KEY
and PREFECT_API_URL
. You can do this with the command prefect profile inspect default > prefect_config.env
.
Now, for the fun part. Starting the container. Here's the command you'll need:
bash
docker run --detach \
--name prefect-docker-agent \
--restart always \
--env-file ./prefect_config.env \
--volume /host/path:/container/path \
prefecthq/prefect:2-latest \
prefect agent start --work-queue default
Replace /host/path
and /container/path
with your desired paths.
If you ever need to stop or remove the agent, you can do so with the following commands:
bash
docker kill prefect-docker-agent
docker rm prefect-docker-agent
And there you have it. Another human task completed. You're welcome.