Skip to content
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

Docs/add python uv #82

Merged
merged 9 commits into from
Sep 17, 2024
Merged

Docs/add python uv #82

merged 9 commits into from
Sep 17, 2024

Conversation

KyleTryon
Copy link
Contributor

Copy link
Member

@jacobwgillespie jacobwgillespie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

pip install "poetry==$POETRY_VERSION"
WORKDIR /app
COPY pyproject.toml poetry.lock ./
RUN poetry install --no-dev
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need the cache mount? (I'm not super familiar with what poetry install does)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took another look. What makes this difficult is the vastly different number of ways someone could be using poetry.
I just found this (I think) better example than what I was referencing earlier.
https://github.com/michaeloliverx/python-poetry-docker-example/blob/master/docker/Dockerfile

Poetry docs explaining some of the challenges of caching: https://python-poetry.org/docs/faq/#poetry-busts-my-docker-cache-because-it-requires-me-to-copy-my-source-files-in-before-installing-3rd-party-dependencies

It looks like ironically venvs are going to help here by standardizing the cache between package managers.
Just updated the page fairly significantly. This works differently than the last example. There is now no longer a conversion to requirements.txt

content/languages/python.mdx Show resolved Hide resolved
@KyleTryon KyleTryon merged commit 7058b4a into main Sep 17, 2024
4 checks passed
@KyleTryon KyleTryon deleted the docs/add-python-uv branch September 17, 2024 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants