-
Notifications
You must be signed in to change notification settings - Fork 680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Core feature] Add official support for managing dependencies with Poetry #5592
Comments
Thank you for opening your first issue here! 🛠 |
Based on the provided data sources, here is the issue title and body for adding official support for managing dependencies with Poetry: Issue Title: [Core feature] Add official support for managing dependencies with Poetry Issue Body: Motivation: Why do you think this is important?Given that Poetry creates a Goal: What should the final outcome look like, ideally?A new section in the Flyte documentation and/or a new example in the GitHub repo. Describe alternatives you've consideredI've considered using pip as proposed, anyway poetry is the tool-to-use in the company and in order to manage python dependencies. Pip is not a possible solution to me. Propose: Link/Inline OR Additional contextI'd like to build a docker image containing all the dependencies installed globally via poetry (I need to lock dependencies) and register the pipeline to the cluster with the custom image (already pushed to the registry) by using Here’s the Dockerfile FROM python:3.11-slim
WORKDIR /usr/app
RUN apt-get update && apt-get install -y --no-install-recommends \
curl gnupg build-essential cmake libssl-dev
RUN curl -sSL https://install.python-poetry.org/ | POETRY_VERSION=1.7.0 POETRY_HOME=$HOME/.poetry python \
&& ln -s $HOME/.poetry/bin/poetry /usr/bin/poetry \
# install dependencies on the python interpreter and not in the poetry virtualenv
&& poetry config virtualenvs.create false
COPY poetry.lock .
COPY pyproject.toml .
RUN poetry install --only main --no-interaction When the workflow is run I get a This is my folder structure
Pyflyte command is run from the pipelines's parent directory, with pip all works good. Are you sure this issue hasn't been raised already?
Have you read the Code of Conduct?
Sources: This is an AI-generated response and your feedback is appreciated! Please leave a 👍 if this is helpful and 👎 if it is not. Mention @RunLLM to ask follow-up questions. See runllm.com for more! |
There are quite a few folks who use Poetry already. cc @jeevb does freenome not use poetry? |
Could please someone show an example? Thanks |
@mattiadevivo This could an issue with how Flyte registers.
|
@mattiadevivo The issue with the Dockerfile is
|
Thanks, I'm going to test this soon 👍 |
Update: I tested flyteorg/flytekit#2692 and it fixes this issue. After that PR is merged and shipped, your use case should work out of the box. |
Setting |
Motivation: Why do you think this is important?
Given that Poetry creates a
poetry.lock
file and locks dependencies versions it would be useful to add official support/documentation about how to create a Dockerfile using poetry and how to structure the project using it.Goal: What should the final outcome look like, ideally?
A new section in the Flyte documentation and/or a new example in the GitHub repo.
Describe alternatives you've considered
I've considered using pip as proposed, anyway poetry is the tool-to-use in the company and in order to manage python dependencies. Pip is not a possible solution to me.
Propose: Link/Inline OR Additional context
I'd like to build a docker image containing all the dependencies installed globally via poetry (I need to lock dependencies) and register the pipeline to the cluster with the custom image (already pushed to the registry) by using
pyflyte register -p ${FLYTE_PROJECT} -d ${FLYTE_DOMAIN} ${PIPELINE_PATH} --version ${PIPELINE_VERSION} --image "${IMAGE_NAME}:${PIPELINE_VERSION}"
command.Here’s the Dockerfile
When the workflow is run I get a
ModuleNotFoundError: No module named 'example'
where example is the name of the module containing the Flyte components.This is my folder structure
Pyflyte command is run from the pipelines's parent directory, with pip all works good.
Are you sure this issue hasn't been raised already?
Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: