Skip to content

Commit

Permalink
Fix UV install in Makefile (flyteorg#2421)
Browse files Browse the repository at this point in the history
* Fix UV install in Makefile

Signed-off-by: Thomas J. Fan <[email protected]>

* Fixes failing test

Signed-off-by: Thomas J. Fan <[email protected]>

* Use dev version to be simplier

Signed-off-by: Thomas J. Fan <[email protected]>

* Use v0.8.18 flytectl

Signed-off-by: Thomas J. Fan <[email protected]>

* Adds comment

Signed-off-by: Thomas J. Fan <[email protected]>

* Remove version specification

Signed-off-by: Thomas J. Fan <[email protected]>

* Remove version pin

Signed-off-by: Thomas J. Fan <[email protected]>

* Use pseudo version for integreation tests

Signed-off-by: Thomas J. Fan <[email protected]>

* Use a version that packaging recognizes

Signed-off-by: Thomas J. Fan <[email protected]>

* Remove quotes

Signed-off-by: Thomas J. Fan <[email protected]>

* Set flyteidl version

Signed-off-by: Thomas J. Fan <[email protected]>

* FIX Fixes version more for uv strictness

Signed-off-by: Thomas J. Fan <[email protected]>

---------

Signed-off-by: Thomas J. Fan <[email protected]>
  • Loading branch information
thomasjpfan authored May 16, 2024
1 parent 76fb7c3 commit edab1e3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pythonbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ jobs:
file: Dockerfile.dev
build-args: |
PYTHON_VERSION=${{ matrix.python-version }}
PSEUDO_VERSION=1.999.0dev0
push: true
tags: localhost:30000/flytekit:dev
cache-from: type=gha
Expand Down
17 changes: 10 additions & 7 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,16 @@ RUN apt-get update && apt-get install build-essential vim libmagic1 git -y \

COPY . /flytekit

RUN SETUPTOOLS_SCM_PRETEND_VERSION_FOR_FLYTEKIT=$PSEUDO_VERSION uv pip install --system --no-cache-dir -U \
"git+https://github.com/flyteorg/flyte.git@master#subdirectory=flyteidl" \
-e /flytekit \
-e /flytekit/plugins/flytekit-k8s-pod \
-e /flytekit/plugins/flytekit-deck-standard \
-e /flytekit/plugins/flytekit-flyteinteractive \
scikit-learn \
# Use a future version of SETUPTOOLS_SCM_PRETEND_VERSION_FOR_FLYTEIDL such that uv resolution works.
RUN SETUPTOOLS_SCM_PRETEND_VERSION_FOR_FLYTEKIT=$PSEUDO_VERSION \
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_FLYTEIDL=3.0.0dev0 \
uv pip install --system --no-cache-dir -U \
"git+https://github.com/flyteorg/flyte.git@master#subdirectory=flyteidl" \
-e /flytekit \
-e /flytekit/plugins/flytekit-k8s-pod \
-e /flytekit/plugins/flytekit-deck-standard \
-e /flytekit/plugins/flytekit-flyteinteractive \
scikit-learn \
&& apt-get clean autoclean \
&& apt-get autoremove --yes \
&& rm -rf /var/lib/{apt,dpkg,cache,log}/ \
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ setup: install-piptools ## Install requirements
# Warning: this will install the requirements in your system python
.PHONY: setup-global-uv
setup-global-uv:
uv pip install --system -r dev-requirements.in
# Use "dev0" prefix to emulate version for dev environment
SETUPTOOLS_SCM_PRETEND_VERSION="1.999.0dev0" uv pip install --system -r dev-requirements.in

.PHONY: fmt
fmt:
Expand Down

0 comments on commit edab1e3

Please sign in to comment.