<#6119 [Docs] Document how to use `poetry` as the ...
# flyte-github
c
#6119 [Docs] Document how to use
poetry
as the python package manager
Issue created by eapolinario ### Description https://python-poetry.org/ should be supported as a packager manager. In https://flyte-org.slack.com/archives/CP2HDHKE1/p1734613391404869?thread_ts=1734610263.071079&cid=CP2HDHKE1 a user figured out the right invocation of poetry in a dockerfile, it basically boils down to having this as the
ENTRYPOINT
in a docker file:
Copy code
ENTRYPOINT ["poetry", "run", "--"]
We should add a full example to the docs to help
poetry
users run flytekit. #### Dockerfile A sample dockerfile might look something like
Copy code
FROM pytorch/pytorch:2.1.2-cuda11.8-cudnn8-devel

# Install system dependencies
RUN apt-get update --fix-missing && \
    apt-get install -y git python3-pip && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# Install Python dependencies before copying the rest of the code
WORKDIR /app
COPY poetry.lock pyproject.toml /app/
RUN pip --disable-pip-version-check install "poetry==1.5.1" awscli && \
    poetry config virtualenvs.create true && \
    poetry config virtualenvs.in-project true && \
    poetry config virtualenvs.options.always-copy true && \
    poetry install --no-interaction --no-ansi

# Copy the rest of the code
COPY . /app

# Set up a generic entrypoint so we can run arbitrary commands in the poetry environment
# Pass an argument separator so that poetry doesn't consume any further argument separators
ENTRYPOINT ["poetry", "run", "--"]
### Are you sure this issue hasn't been raised already? • Yes ### Have you read the Code of Conduct? • Yes flyteorg/flyte