Omar Rizwani
01/14/2025, 5:15 PMVM
host.
I have run a Prefect Docker Container
from this VM
host & successfully mounted my gcloud
credentials to it.
A Docker workpool
is defined via YAML with a volume mount for host gcloud credentials to worker.
A worker
has been started on the Prefect Docker Container
. It is this worker
that is missing some of the expected gcloud
credentials.
How can I fix this specific scenario?Marvin
01/14/2025, 5:16 PMGOOGLE_APPLICATION_CREDENTIALS
to be set.
4. Docker Configuration in YAML: Ensure your YAML configuration for the Docker workpool correctly specifies the volume mounts. The configuration should explicitly map the host directory containing the credentials to the appropriate path in the Docker container.
5. Troubleshooting Resources: You might find additional insights in the Prefect Docker deployment guide.
6. Community and Issues: If the problem persists, consider checking the Prefect GitHub issues or forums for similar cases. There might be ongoing discussions or solutions provided by the community.
If these steps don't resolve your issue, you may want to provide more specific details about your configuration so that further assistance can be given.Nate
01/14/2025, 6:46 PMOmar Rizwani
01/15/2025, 8:22 AMOmar Rizwani
01/15/2025, 5:04 PMDocker Container
on my Google Cloud Linux VM
and called a Prefect Docker Worker
from there using the following Prefect CLI
commands - ๐ค
$ prefect work-pool ls
______________________________________________________
โ Name โ Type โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ imagery-etl-cloud-run-pool-gpu โ cloud-run-v2:push โ
โ imagery-etl-vertex-ai-pool โ vertex-ai โ
โ local-docker-testing-pool (**) โ docker โ
โ imagery-etl-vm-worker-pool โ docker โ
โ imagery-etl-cloud-run-pool โ cloud-run-v2:push |
______________________________________________________
$ prefect work-pool resume imagery-etl-vm-worker-pool
$ prefect worker start -p imagery-etl-vm-worker-pool
Then the following Prefect Deployment YAML
definition for the Docker workpool & workers
would suffice...
name: imagery-etl-vm-worker-pool
job_variables:
name: download-docker-queue
image: some_image
volumes:
- /root/.config/gcloud:/root/.config/gcloud
env: {
"PREFECT_LOGGING_LEVEL": "DEBUG",
}
It turned out that the source of the volume mount had to refer to my VM
rather than the Docker Container
that I was actually sat on running the Prefect CLI
commands... ๐คทโโ๏ธ
name: imagery-etl-vm-worker-pool
job_variables:
name: download-docker-queue
image: some_image
volumes:
- /home/user_profile_on_vm/.config/gcloud:/root/.config/gcloud
env: {
"PREFECT_LOGGING_LEVEL": "DEBUG",
}