-
Notifications
You must be signed in to change notification settings - Fork 32
♻️Maintenance: Improve UV usage #6566
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
Merged
sanderegg
merged 23 commits into
ITISFoundation:master
from
sanderegg:maintenance/uv-fixes
Oct 22, 2024
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
da47aba
install UV via COPY
sanderegg b3f06ac
added parametrization
sanderegg 0764d8e
use all patch version
sanderegg ba8f312
stuff half working
sanderegg b8947f0
use multi-stage uv
sanderegg a73794c
use multi-stage to install UV
sanderegg 9814a7b
compile byte code for production
sanderegg 1409fa4
any .venv should not be part of a docker context
sanderegg 1722030
unify
sanderegg 104ff3c
remove unnecessary stuff
sanderegg da7c6f8
remove base installation
sanderegg 2db6388
us pip sync
sanderegg f88211d
unify
sanderegg 26a9972
unify
sanderegg b44356c
unify
sanderegg 476c88f
use uv
sanderegg 48330b6
fixes
sanderegg 6531cde
do not install uv it's there
sanderegg 6f68083
unify
sanderegg f9c421c
use uv
sanderegg 836b697
unify
sanderegg 78a70c2
moved installation of debugpy to boot script
sanderegg 7af3cc9
revert changes
sanderegg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,7 +8,7 @@ ops/ | |
| *.py[cod] | ||
|
|
||
| # virtualenv | ||
| .venv | ||
| **/.venv | ||
|
|
||
| #python eggs | ||
| **/*.egg-info | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,27 @@ | ||
| # syntax=docker/dockerfile:1 | ||
| ARG UV_VERSION="0.4" | ||
| FROM ghcr.io/astral-sh/uv:${UV_VERSION} AS uv_build | ||
| # we docker image is built based on debian | ||
| FROM python:3.11.9-buster | ||
|
|
||
| RUN curl https://rclone.org/install.sh | bash && \ | ||
| rclone --version | ||
|
|
||
| # install UV https://docs.astral.sh/uv/guides/integration/docker/#installing-uv | ||
| COPY --from=uv_build /uv /uvx /bin/ | ||
|
|
||
| WORKDIR /scripts | ||
|
|
||
| COPY packages/postgres-database postgres-database | ||
| RUN --mount=type=cache,mode=0755,target=/root/.cache/pip \ | ||
| cd postgres-database && pip install . | ||
| RUN --mount=type=cache,target=/root/.cache/uv \ | ||
| cd postgres-database && uv pip install . | ||
|
|
||
| COPY packages/settings-library settings-library | ||
| RUN --mount=type=cache,mode=0755,target=/root/.cache/pip \ | ||
| cd settings-library && pip install . | ||
| RUN --mount=type=cache,target=/root/.cache/uv \ | ||
| cd settings-library && uv pip install . | ||
|
|
||
| COPY scripts/maintenance/migrate_project/requirements.txt /scripts/requirements.txt | ||
| RUN --mount=type=cache,mode=0755,target=/root/.cache/pip \ | ||
| pip install -r /scripts/requirements.txt | ||
| RUN --mount=type=cache,target=/root/.cache/uv \ | ||
| uv pip install -r /scripts/requirements.txt | ||
|
|
||
| COPY scripts/maintenance/migrate_project/src/*.py /scripts/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.