Hi. I wanted to checkout the spark example in the ...
# ask-the-community
ł
Hi. I wanted to checkout the spark example in the docs, and when I run the example command:
Copy code
pyflyte run --remote \
  <https://raw.githubusercontent.com/flyteorg/flytesnacks/master/examples/k8s_spark_plugin/k8s_spark_plugin/pyspark_pi.py> \
  my_spark
I get the following error:
Copy code
Image <http://ghcr.io/flyteorg/flyte-spark-plugin:wW5uyALAjghBBtj8TF_cbQ|ghcr.io/flyteorg/flyte-spark-plugin:wW5uyALAjghBBtj8TF_cbQ>.. not found. Building...
Run command: envd build --path /var/folders/77/w8np1m8n4dd9vrqcxxz62cs80000gn/T/flyte-pqw8ut11/sandbox/local_flytekit/1e226fd242ce20f1885339810fcc938a  --platform linux/amd64 --output type=image,name=<http://ghcr.io/flyteorg/flyte-spark-plugin:wW5uyALAjghBBtj8TF_cbQ..,push=true|ghcr.io/flyteorg/flyte-spark-plugin:wW5uyALAjghBBtj8TF_cbQ..,push=true>
#1 <docker-image://cr.flyte.org/flyteorg/flytekit:spark-1.9.1>
#1 resolve <http://cr.flyte.org/flyteorg/flytekit:spark-1.9.1|cr.flyte.org/flyteorg/flytekit:spark-1.9.1>
#1 resolve <http://cr.flyte.org/flyteorg/flytekit:spark-1.9.1|cr.flyte.org/flyteorg/flytekit:spark-1.9.1> 0.8s done
#1 DONE 0.8s
#2 [internal] prepare language
#2 CACHED
#3 [internal] language environment and system packages
#3 CACHED
#4 [internal] setting PyPI index dir /etc
#4 CACHED
#5 [internal] setting PyPI index file /etc/pip.conf
#5 CACHED
#6 exporting to image
#6 exporting layers done
#6 exporting manifest sha256:d14334cf03eb87250bce3a6c11c43ce8217759e4ab61eda0560e4329f8ce4ae6 done
#6 exporting config sha256:59685ea11edc5f360d83e7e20b6080a011ebc38ca7e9edcedf58374aaa6fd3f4
#6 exporting config sha256:59685ea11edc5f360d83e7e20b6080a011ebc38ca7e9edcedf58374aaa6fd3f4 done
#6 pushing layers
#6 pushing layers 0.4s done
#6 ERROR: failed to authorize: failed to fetch anonymous token: unexpected status from GET request to <https://ghcr.io/token?scope=repository%3Aflyteorg%2Fflyte-spark-plugin%3Apull%2Cpush&service=ghcr.io>: 403 Forbidden
------
> exporting to image:
------
Failed with Unknown Exception <class 'Exception'> Reason: failed to run command envd build --path /var/folders/77/w8np1m8n4dd9vrqcxxz62cs80000gn/T/flyte-pqw8ut11/sandbox/local_flytekit/1e226fd242ce20f1885339810fcc938a  --platform linux/amd64 --output type=image,name=<http://ghcr.io/flyteorg/flyte-spark-plugin:wW5uyALAjghBBtj8TF_cbQ..,push=true|ghcr.io/flyteorg/flyte-spark-plugin:wW5uyALAjghBBtj8TF_cbQ..,push=true> with error b'time="2023-09-03T18:49:51+02:00" level=fatal msg="failed to build the image: failed to build: failed to wait error group: failed to solve LLB: failed to solve: failed to fetch anonymous token: unexpected status from GET request to <https://ghcr.io/token?scope=repository%3Aflyteorg%2Fflyte-spark-plugin%3Apull%2Cpush&service=ghcr.io>: 403 Forbidden"\n'
Am I doing something wrong or did flyteorg on github change some permissions since they created the example?
k
could you change registry to your docker hub account, and rebuild again?
Copy code
custom_image = ImageSpec(name="flyte-spark-plugin", registry="<docker_hub_id>")
ł
Hey. That seems to have solved it. Thanks