wip: use uv more fully

waiting for https://github.com/astral-sh/uv/issues/2744
bd/uv2
Bryce 2 months ago
parent ce37e60b11
commit f8130f8e1c

@ -5,7 +5,7 @@ venv_name = $(venv_prefix)-$(python_version)
pyenv_instructions=https://github.com/pyenv/pyenv#installation pyenv_instructions=https://github.com/pyenv/pyenv#installation
pyenv_virt_instructions=https://github.com/pyenv/pyenv-virtualenv#pyenv-virtualenv pyenv_virt_instructions=https://github.com/pyenv/pyenv-virtualenv#pyenv-virtualenv
# waiting for https://github.com/astral-sh/uv/issues/2744 to be resolved
init: require_pyenv ## Setup a dev environment for local development. init: require_pyenv ## Setup a dev environment for local development.
@pyenv install $(python_version) -s @pyenv install $(python_version) -s
@echo -e "\033[0;32m ✔️ 🐍 $(python_version) installed \033[0m" @echo -e "\033[0;32m ✔️ 🐍 $(python_version) installed \033[0m"
@ -27,6 +27,7 @@ init: require_pyenv ## Setup a dev environment for local development.
@echo -e "The following commands are available to run in the Makefile:\n" @echo -e "The following commands are available to run in the Makefile:\n"
@make -s help @make -s help
req-init: requirements init ## Alias of `make requirements && make init`
af: autoformat ## Alias for `autoformat` af: autoformat ## Alias for `autoformat`
autoformat: ## Run the autoformatter. autoformat: ## Run the autoformatter.
@ -76,8 +77,8 @@ build-dev-image:
run-dev: build-dev-image run-dev: build-dev-image
docker run -it -v $$HOME/.cache/huggingface:/root/.cache/huggingface -v $$HOME/.cache/torch:/root/.cache/torch -v `pwd`/outputs:/outputs imaginairy-dev /bin/bash docker run -it -v $$HOME/.cache/huggingface:/root/.cache/huggingface -v $$HOME/.cache/torch:/root/.cache/torch -v `pwd`/outputs:/outputs imaginairy-dev /bin/bash
requirements: ## Freeze the requirements.txt file requirements: ## Update the frozen requirements.txt file
pip-compile setup.py requirements-dev.in --output-file=requirements-dev.txt --upgrade --resolver=backtracking uv pip compile setup.py requirements-dev.in --output-file=requirements-dev.txt --upgrade
require_pyenv: require_pyenv:
@if ! [ -x "$$(command -v pyenv)" ]; then\ @if ! [ -x "$$(command -v pyenv)" ]; then\
@ -231,7 +232,7 @@ vendorize_facexlib:
sed -i '' '/from \.version import __gitsha__, __version__/d' ./imaginairy/vendored/facexlib/__init__.py sed -i '' '/from \.version import __gitsha__, __version__/d' ./imaginairy/vendored/facexlib/__init__.py
make af make af
vendorize: ## vendorize a github repo. `make vendorize REPO=git@github.com:openai/CLIP.git PKG=clip` vendorize: # vendorize a github repo. `make vendorize REPO=git@github.com:openai/CLIP.git PKG=clip`
mkdir -p ./downloads mkdir -p ./downloads
-cd ./downloads && git clone $(REPO) $(PKG) -cd ./downloads && git clone $(REPO) $(PKG)
cd ./downloads/$(PKG) && git fetch && git checkout $(COMMIT) cd ./downloads/$(PKG) && git fetch && git checkout $(COMMIT)

@ -5,7 +5,6 @@ mkdocs-click
mkdocstrings[python] mkdocstrings[python]
mypy mypy
ruff ruff
pip-tools
pytest pytest
pytest-asyncio pytest-asyncio
pytest-randomly pytest-randomly

@ -1,9 +1,5 @@
# # This file was autogenerated by uv via the following command:
# This file is autogenerated by pip-compile with Python 3.10 # uv pip compile setup.py requirements-dev.in --output-file=requirements-dev.txt
# by the following command:
#
# pip-compile --output-file=requirements-dev.txt requirements-dev.in setup.py
#
annotated-types==0.6.0 annotated-types==0.6.0
# via pydantic # via pydantic
antlr4-python3-runtime==4.9.3 antlr4-python3-runtime==4.9.3
@ -14,8 +10,6 @@ anyio==4.3.0
# starlette # starlette
babel==2.14.0 babel==2.14.0
# via mkdocs-material # via mkdocs-material
build==1.1.1
# via pip-tools
certifi==2024.2.2 certifi==2024.2.2
# via # via
# httpcore # httpcore
@ -27,59 +21,48 @@ click==8.1.7
# via # via
# click-help-colors # click-help-colors
# click-shell # click-shell
# imaginAIry (setup.py)
# mkdocs # mkdocs
# mkdocs-click # mkdocs-click
# mkdocstrings # mkdocstrings
# pip-tools
# uvicorn # uvicorn
click-help-colors==0.9.4 click-help-colors==0.9.4
# via imaginAIry (setup.py)
click-shell==2.1 click-shell==2.1
# via imaginAIry (setup.py)
colorama==0.4.6 colorama==0.4.6
# via # via
# griffe # griffe
# mkdocs-material # mkdocs-material
coverage==7.4.4 coverage==7.4.4
# via -r requirements-dev.in diffusers==0.27.2
diffusers==0.27.0
# via imaginAIry (setup.py)
einops==0.7.0 einops==0.7.0
# via imaginAIry (setup.py)
exceptiongroup==1.2.0 exceptiongroup==1.2.0
# via # via
# anyio # anyio
# pytest # pytest
fastapi==0.110.0 fastapi==0.110.0
# via imaginAIry (setup.py) filelock==3.13.3
filelock==3.13.1
# via # via
# diffusers # diffusers
# huggingface-hub # huggingface-hub
# torch # torch
# transformers # transformers
fsspec==2024.2.0 fsspec==2024.3.1
# via # via
# huggingface-hub # huggingface-hub
# torch # torch
ftfy==6.1.3 ftfy==6.2.0
# via # via open-clip-torch
# imaginAIry (setup.py)
# open-clip-torch
ghp-import==2.1.0 ghp-import==2.1.0
# via mkdocs # via mkdocs
griffe==0.42.0 griffe==0.42.1
# via mkdocstrings-python # via mkdocstrings-python
h11==0.14.0 h11==0.14.0
# via # via
# httpcore # httpcore
# uvicorn # uvicorn
httpcore==1.0.4 httpcore==1.0.5
# via httpx # via httpx
httpx==0.27.0 httpx==0.27.0
# via -r requirements-dev.in huggingface-hub==0.22.2
huggingface-hub==0.21.4
# via # via
# diffusers # diffusers
# open-clip-torch # open-clip-torch
@ -91,12 +74,11 @@ idna==3.6
# anyio # anyio
# httpx # httpx
# requests # requests
importlib-metadata==7.0.2 importlib-metadata==7.1.0
# via diffusers # via diffusers
iniconfig==2.0.0 iniconfig==2.0.0
# via pytest # via pytest
jaxtyping==0.2.28 jaxtyping==0.2.28
# via imaginAIry (setup.py)
jinja2==3.1.3 jinja2==3.1.3
# via # via
# mkdocs # mkdocs
@ -104,17 +86,15 @@ jinja2==3.1.3
# mkdocstrings # mkdocstrings
# torch # torch
kornia==0.7.2 kornia==0.7.2
# via imaginAIry (setup.py) kornia-rs==0.1.2
kornia-rs==0.1.1
# via kornia # via kornia
markdown==3.5.2 markdown==3.6
# via # via
# mkdocs # mkdocs
# mkdocs-autorefs # mkdocs-autorefs
# mkdocs-click # mkdocs-click
# mkdocs-material # mkdocs-material
# mkdocstrings # mkdocstrings
# mkdocstrings-python
# pymdown-extensions # pymdown-extensions
markupsafe==2.1.5 markupsafe==2.1.5
# via # via
@ -132,44 +112,33 @@ mkdocs==1.5.3
mkdocs-autorefs==1.0.1 mkdocs-autorefs==1.0.1
# via mkdocstrings # via mkdocstrings
mkdocs-click==0.8.1 mkdocs-click==0.8.1
# via -r requirements-dev.in mkdocs-material==9.5.16
mkdocs-material==9.5.13
# via -r requirements-dev.in
mkdocs-material-extensions==1.3.1 mkdocs-material-extensions==1.3.1
# via mkdocs-material # via mkdocs-material
mkdocstrings[python]==0.24.1 mkdocstrings==0.24.1
# via # via mkdocstrings-python
# -r requirements-dev.in mkdocstrings-python==1.8.0
# mkdocstrings-python
mkdocstrings-python==1.9.0
# via mkdocstrings # via mkdocstrings
mpmath==1.3.0 mpmath==1.3.0
# via sympy # via sympy
mypy==1.9.0 mypy==1.9.0
# via -r requirements-dev.in
mypy-extensions==1.0.0 mypy-extensions==1.0.0
# via mypy # via mypy
networkx==3.2.1 networkx==3.2.1
# via torch # via torch
numpy==1.24.4 numpy==1.24.4
# via # via
# -c tests/constraints.txt
# diffusers # diffusers
# imaginAIry (setup.py)
# jaxtyping # jaxtyping
# opencv-python # opencv-python
# scipy # scipy
# torchvision # torchvision
# transformers # transformers
omegaconf==2.3.0 omegaconf==2.3.0
# via imaginAIry (setup.py)
open-clip-torch==2.24.0 open-clip-torch==2.24.0
# via imaginAIry (setup.py)
opencv-python==4.9.0.80 opencv-python==4.9.0.80
# via imaginAIry (setup.py)
packaging==24.0 packaging==24.0
# via # via
# build
# huggingface-hub # huggingface-hub
# kornia # kornia
# mkdocs # mkdocs
@ -180,29 +149,21 @@ paginate==0.5.6
# via mkdocs-material # via mkdocs-material
pathspec==0.12.1 pathspec==0.12.1
# via mkdocs # via mkdocs
pillow==10.2.0 pillow==10.3.0
# via # via
# diffusers # diffusers
# imaginAIry (setup.py)
# torchvision # torchvision
pip-tools==7.4.1
# via -r requirements-dev.in
platformdirs==4.2.0 platformdirs==4.2.0
# via # via
# mkdocs # mkdocs
# mkdocstrings # mkdocstrings
pluggy==1.4.0 pluggy==1.4.0
# via pytest # via pytest
protobuf==5.26.0 protobuf==5.26.1
# via # via open-clip-torch
# imaginAIry (setup.py)
# open-clip-torch
psutil==5.9.8 psutil==5.9.8
# via imaginAIry (setup.py)
pydantic==2.6.4 pydantic==2.6.4
# via # via fastapi
# fastapi
# imaginAIry (setup.py)
pydantic-core==2.16.3 pydantic-core==2.16.3
# via pydantic # via pydantic
pygments==2.17.2 pygments==2.17.2
@ -212,23 +173,14 @@ pymdown-extensions==10.7.1
# mkdocs-material # mkdocs-material
# mkdocstrings # mkdocstrings
pyparsing==3.1.2 pyparsing==3.1.2
# via imaginAIry (setup.py)
pyproject-hooks==1.0.0
# via
# build
# pip-tools
pytest==8.1.1 pytest==8.1.1
# via # via
# -r requirements-dev.in
# pytest-asyncio # pytest-asyncio
# pytest-randomly # pytest-randomly
# pytest-sugar # pytest-sugar
pytest-asyncio==0.23.5.post1 pytest-asyncio==0.23.6
# via -r requirements-dev.in
pytest-randomly==3.15.0 pytest-randomly==3.15.0
# via -r requirements-dev.in
pytest-sugar==1.0.0 pytest-sugar==1.0.0
# via -r requirements-dev.in
python-dateutil==2.9.0.post0 python-dateutil==2.9.0.post0
# via ghp-import # via ghp-import
pyyaml==6.0.1 pyyaml==6.0.1
@ -253,24 +205,18 @@ requests==2.31.0
# via # via
# diffusers # diffusers
# huggingface-hub # huggingface-hub
# imaginAIry (setup.py)
# mkdocs-material # mkdocs-material
# responses # responses
# transformers # transformers
responses==0.25.0 responses==0.25.0
# via -r requirements-dev.in ruff==0.3.5
ruff==0.3.3
# via -r requirements-dev.in
safetensors==0.4.2 safetensors==0.4.2
# via # via
# diffusers # diffusers
# imaginAIry (setup.py)
# timm # timm
# transformers # transformers
scipy==1.12.0 scipy==1.12.0
# via # via torchdiffeq
# imaginAIry (setup.py)
# torchdiffeq
sentencepiece==0.2.0 sentencepiece==0.2.0
# via open-clip-torch # via open-clip-torch
six==1.16.0 six==1.16.0
@ -284,55 +230,39 @@ starlette==0.36.3
sympy==1.12 sympy==1.12
# via torch # via torch
termcolor==2.4.0 termcolor==2.4.0
# via # via pytest-sugar
# imaginAIry (setup.py)
# pytest-sugar
timm==0.9.16 timm==0.9.16
# via # via open-clip-torch
# imaginAIry (setup.py)
# open-clip-torch
tokenizers==0.15.2 tokenizers==0.15.2
# via transformers # via transformers
tomli==2.0.1 tomli==2.0.1
# via # via
# build
# mypy # mypy
# pip-tools
# pyproject-hooks
# pytest # pytest
torch==2.2.1 torch==2.2.2
# via # via
# imaginAIry (setup.py)
# kornia # kornia
# open-clip-torch # open-clip-torch
# timm # timm
# torchdiffeq # torchdiffeq
# torchvision # torchvision
torchdiffeq==0.2.3 torchdiffeq==0.2.3
# via imaginAIry (setup.py) torchvision==0.17.2
torchvision==0.17.1
# via # via
# imaginAIry (setup.py)
# open-clip-torch # open-clip-torch
# timm # timm
tqdm==4.66.2 tqdm==4.66.2
# via # via
# huggingface-hub # huggingface-hub
# imaginAIry (setup.py)
# open-clip-torch # open-clip-torch
# transformers # transformers
transformers==4.38.2 transformers==4.39.2
# via imaginAIry (setup.py)
typeguard==2.13.3 typeguard==2.13.3
# via jaxtyping # via jaxtyping
types-pillow==10.2.0.20240311 types-pillow==10.2.0.20240331
# via -r requirements-dev.in types-psutil==5.9.5.20240316
types-psutil==5.9.5.20240311 types-requests==2.31.0.20240402
# via -r requirements-dev.in
types-requests==2.31.0.20240311
# via -r requirements-dev.in
types-tqdm==4.66.0.20240106 types-tqdm==4.66.0.20240106
# via -r requirements-dev.in
typing-extensions==4.10.0 typing-extensions==4.10.0
# via # via
# anyio # anyio
@ -348,19 +278,11 @@ urllib3==2.2.1
# requests # requests
# responses # responses
# types-requests # types-requests
uvicorn==0.28.0 uvicorn==0.29.0
# via imaginAIry (setup.py)
watchdog==4.0.0 watchdog==4.0.0
# via mkdocs # via mkdocs
wcwidth==0.2.13 wcwidth==0.2.13
# via ftfy # via ftfy
wheel==0.43.0 wheel==0.43.0
# via
# -r requirements-dev.in
# pip-tools
zipp==3.18.1 zipp==3.18.1
# via importlib-metadata # via importlib-metadata
# The following packages are considered to be unsafe in a requirements file:
# pip
# setuptools

Loading…
Cancel
Save