https://prefect.io logo
Title
s

sark

09/23/2020, 9:07 AM
hi guys i have an empty flow
with Flow('flow', storage=docker_storage) as flow:
    passs
using docker storage
docker_storage=Docker(registry_url="<http://gcr.io/repo|gcr.io/repo>", dockerfile='Dockerfile')
where the dockerfile is just
FROM prefecthq/prefect:all_extras-0.13.7
and the agent logs show
[2020-09-23 09:01:30,367] INFO - agent | Pulling image <http://gcr.io/repo/flow:2020-09-23t08-59-44-707304-00-00|gcr.io/repo/flow:2020-09-23t08-59-44-707304-00-00>...
ERROR: gcloud failed to load: No module named '_sqlite3'
    gcloud_main = _import_gcloud_main()
    import googlecloudsdk.gcloud_main
    from googlecloudsdk.api_lib.iamcredentials import util as iamcred_util
    from googlecloudsdk.core.credentials import transports
    from googlecloudsdk.core.credentials import http
    from googlecloudsdk.core.credentials import creds as core_creds
    import sqlite3
    from sqlite3.dbapi2 import *
    from _sqlite3 import *

This usually indicates corruption in your gcloud installation or problems with your Python interpreter.

Please verify that the following is the path to a working Python 2.7 or 3.5+ executable:
    /opt/prefect/.local/share/virtualenvs/prefect-Ta6MxEs8/bin/python3

If it is not, please set the CLOUDSDK_PYTHON environment variable to point to a working Python 2.7 or 3.5+ executable.

If you are still experiencing problems, please reinstall the Cloud SDK using the instructions here:
    <https://cloud.google.com/sdk/>
so this seems like it is the agent not having proper GCR auth? how can i configure the docker agent for this? is there a way to configure the image of the agent like it is possible to configure the image for the flow?
where is
/opt/prefect/.local/share/virtualenvs/prefect-Ta6MxEs8/bin/python3
from? is there a way i can configure it?
j

josh

09/23/2020, 11:19 AM
@sark Where are you running the docker agent? On your host machine or inside a docker container itself? I’ve seen this error in some containers before where they are missing some low level imports this rendering the default sqllite3 installation incomplete
s

sark

09/24/2020, 3:00 AM
i’m running the docker agent on the same host machine as that for the prefect server
pipenv run prefect agent start docker -l gcs-flow-storage -l docker --volume /var/run/docker.sock:/var/run/docker.sock