colossal-musician-95989
09/10/2024, 10:16 AMTraceback (most recent call last):
File "/opt/micromamba/envs/runtime/lib/python3.10/site-packages/flytekit/exceptions/scopes.py", line 242, in user_entry_point
return wrapped(*args, **kwargs)
File "/root/sat_stac.py", line 35, in parse_geojson
from pystac_client import Client
Message:
ModuleNotFoundError: No module named 'pystac_client'
User error.
colossal-musician-95989
09/10/2024, 10:45 AMRunning Execution on Remote.
Image us-central1-docker.pkg.dev/glowing-cooler/flyte-utils/geoenv:vtRFq5MYr5OPDqCiXgA9BQ found. Skip building.
I dont need it to build a new one, i want it to respect the tag "latest". the tag it shows here after geoenv: is an old hash from previous commit.colossal-musician-95989
09/10/2024, 10:45 AMfreezing-airport-6809
colossal-musician-95989
09/10/2024, 1:48 PMimage_spec = ImageSpec(
registry="us-central1-docker.pkg.dev/glowing-cooler/flyte-utils",
name="flytekit-geo",
base_image="us-central1-docker.pkg.dev/glowing-cooler/flyte-utils/flytekit-geo:flytekit-geo-latest"
)
colossal-musician-95989
09/10/2024, 1:50 PMcolossal-musician-95989
09/10/2024, 1:52 PMcolossal-musician-95989
09/10/2024, 1:53 PMTraceback (most recent call last):
File "/opt/micromamba/envs/runtime/lib/python3.10/site-packages/flytekit/exceptions/scopes.py", line 242, in user_entry_point
return wrapped(*args, **kwargs)
File "/root/sat_stac.py", line 35, in parse_geojson
from pystac_client import Client
Message:
ModuleNotFoundError: No module named 'pystac_client'
User error.
average-finland-92144
09/10/2024, 2:59 PMpackages = ["pystac_client"]
or invoque a requirements filecolossal-musician-95989
09/10/2024, 3:04 PMaverage-finland-92144
09/10/2024, 3:14 PMsimply referring to a docker for a task and making sure the imports for that task stays within the task seemed a good option.ImageSpec should work for that use case. Could you share your base image config? Also, could you run a container using the custom docker image and check if pystac_client is available?
average-finland-92144
09/10/2024, 3:15 PMcolossal-musician-95989
09/10/2024, 3:20 PMCould you run a container using the custom docker image and check if pystac_client is available?yep I checked the container im my local. the libraires are available here's the dockerfile
ARG PYTHON_VERSION=3.12
FROM python:${PYTHON_VERSION}-slim-bookworm
WORKDIR /root
ENV VENV /opt/venv
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
ENV PYTHONPATH /root
# Set environment variables for GDAL
ENV CPLUS_INCLUDE_PATH=/usr/include/gdal
ENV C_INCLUDE_PATH=/usr/include/gdal
RUN apt-get update && apt-get install -y \
build-essential \
libgdal-dev \
libproj-dev \
libgeos-dev \
gdal-bin
# Install the AWS cli separately to prevent issues with boto being written over
RUN pip3 install awscli
# Install Python dependencies
COPY requirements.txt /root
RUN pip install uv
RUN uv pip install boto3 --system
RUN uv pip install -r /root/requirements.txt --system
COPY app /root/app
COPY $config /root/flyte.config
ARG tag
ENV FLYTE_INTERNAL_IMAGE $tag
how I register is pretty much them like how its done in these flytelab repos - https://github.com/flyteorg/flytelab/blob/main/projects/weather_forecasting/DEPLOYMENT.md
using the Makefile
.PHONY: register
register: docker-push serialize
flytectl -c ${FLYTECTL_CONFIG} \
register files \
--project ${PROJECT} \
--domain ${DOMAIN} \
--archive flyte-package.tgz \
--force \
--version ${VERSION}
essentially i based my git repo on those projects, not many changes at allaverage-finland-92144
09/10/2024, 3:51 PM<http://us-central1-docker.pkg.dev/glowing-cooler/flyte-utils/geoenv:flytekit-geo-latest|us-central1-docker.pkg.dev/glowing-cooler/flyte-utils/geoenv:flytekit-geo-latest>
colossal-musician-95989
09/10/2024, 4:13 PM