Skip to content

Commit

Permalink
Gen 6: prefer pytorch.org, unpin seed packages, remove opencv
Browse files Browse the repository at this point in the history
  • Loading branch information
nevillelyh committed Oct 16, 2024
1 parent fb4e4c8 commit 05c47dd
Show file tree
Hide file tree
Showing 106 changed files with 17,861 additions and 7 deletions.
48 changes: 47 additions & 1 deletion src/monogen.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ class MonoGen:
),
]

# uv venv --seed does not install deprecated setuptools or wheel for Python 3.12
# Explicitly declare them here
# Versions are not pinned and we will use whatever Torch index has
SEED_PKGS = ['pip', 'setuptools', 'wheel']

# Generations are immutable
# Never edit an existing one in place
# Always create a new one for any change
Expand Down Expand Up @@ -264,6 +269,45 @@ class MonoGen:
'wheel==0.44.0',
],
),
MonoGen(
id=6,
cuda={
'11.8': '11.8.0_520.61.05',
'12.1': '12.1.1_530.30.02',
'12.4': '12.4.1_550.54.15',
},
cudnn={
'8': '8.9.7.29',
'9': '9.1.0.70',
},
python={
'3.8': '3.8.20',
'3.9': '3.9.20',
'3.10': '3.10.15',
'3.11': '3.11.10',
'3.12': '3.12.7',
},
torch=[
'2.0.0',
'2.0.1',
'2.1.0',
'2.1.1',
'2.1.2',
'2.2.0',
'2.2.1',
'2.2.2',
'2.3.0',
'2.3.1',
'2.4.0',
'2.4.1',
# Nightly
'2.6.0.dev20240918',
],
pip_pkgs=[
'cog @ https://github.com/replicate/cog/archive/2f883e462e0e0606e38a1d05ef5d02bfe43fa19e.zip',
]
+ SEED_PKGS,
),
]

MONOGENS: dict[str, list[MonoGen]] = {
Expand All @@ -283,7 +327,9 @@ def validate():
for k, v in g.python.items():
assert v.startswith(f'{k}.'), f'[{env}] Python {v} is not {k}'
for p in g.pip_pkgs:
assert '==' in p or '@' in p, f'PIP package {p} is not pinned'
assert (
p in SEED_PKGS or '==' in p or '@' in p
), f'PIP package {p} is not pinned'


validate()
149 changes: 149 additions & 0 deletions src/requirements/g00006/python3.10-torch2.0.0-cu118.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
# This file was autogenerated by uv via the following command:
# uv pip compile --python-platform x86_64-unknown-linux-gnu --emit-index-url --emit-find-links --emit-build-options --emit-index-annotation --extra-index-url https://download.pytorch.org/whl/cu118 --index-url https://pypi.org/simple --index-strategy first-index -
--index-url https://pypi.org/simple
--extra-index-url https://download.pytorch.org/whl/cu118

annotated-types==0.7.0
# via pydantic
# from https://pypi.org/simple
anyio==4.6.2.post1
# via
# starlette
# watchfiles
# from https://pypi.org/simple
attrs==23.2.0
# via cog
# from https://pypi.org/simple
certifi==2022.12.7
# via requests
# from https://download.pytorch.org/whl/cu118
charset-normalizer==2.1.1
# via requests
# from https://download.pytorch.org/whl/cu118
click==8.1.7
# via uvicorn
# from https://pypi.org/simple
cmake==3.25.0
# via triton
# from https://download.pytorch.org/whl/cu118
cog @ https://github.com/replicate/cog/archive/2f883e462e0e0606e38a1d05ef5d02bfe43fa19e.zip
exceptiongroup==1.2.2
# via anyio
# from https://pypi.org/simple
fastapi==0.110.3
# via cog
# from https://pypi.org/simple
filelock==3.13.1
# via
# torch
# triton
# from https://download.pytorch.org/whl/cu118
h11==0.14.0
# via uvicorn
# from https://pypi.org/simple
httptools==0.6.2
# via uvicorn
# from https://pypi.org/simple
idna==3.4
# via
# anyio
# requests
# from https://download.pytorch.org/whl/cu118
jinja2==3.1.3
# via torch
# from https://download.pytorch.org/whl/cu118
lit==15.0.7
# via triton
# from https://download.pytorch.org/whl/cu118
markupsafe==2.1.5
# via jinja2
# from https://download.pytorch.org/whl/cu118
mpmath==1.3.0
# via sympy
# from https://download.pytorch.org/whl/cu118
networkx==3.2.1
# via torch
# from https://download.pytorch.org/whl/cu118
numpy==1.26.3
# via torchvision
# from https://download.pytorch.org/whl/cu118
pillow==10.2.0
# via torchvision
# from https://download.pytorch.org/whl/cu118
pip==24.2
# from https://pypi.org/simple
pydantic==2.9.2
# via
# cog
# fastapi
# from https://pypi.org/simple
pydantic-core==2.23.4
# via pydantic
# from https://pypi.org/simple
python-dotenv==1.0.1
# via uvicorn
# from https://pypi.org/simple
pyyaml==6.0.2
# via
# cog
# uvicorn
# from https://pypi.org/simple
requests==2.28.1
# via
# cog
# torchvision
# from https://download.pytorch.org/whl/cu118
setuptools==70.0.0
# from https://download.pytorch.org/whl/cu118
sniffio==1.3.1
# via anyio
# from https://pypi.org/simple
starlette==0.37.2
# via fastapi
# from https://pypi.org/simple
structlog==24.4.0
# via cog
# from https://pypi.org/simple
sympy==1.12
# via torch
# from https://download.pytorch.org/whl/cu118
torch==2.0.0+cu118
# via
# torchaudio
# torchvision
# triton
# from https://download.pytorch.org/whl/cu118
torchaudio==2.0.0+cu118
# from https://download.pytorch.org/whl/cu118
torchvision==0.15.0+cu118
# from https://download.pytorch.org/whl/cu118
triton==2.0.0
# via torch
# from https://download.pytorch.org/whl/cu118
typing-extensions==4.9.0
# via
# anyio
# cog
# fastapi
# pydantic
# pydantic-core
# torch
# uvicorn
# from https://download.pytorch.org/whl/cu118
urllib3==1.26.13
# via requests
# from https://download.pytorch.org/whl/cu118
uvicorn==0.32.0
# via cog
# from https://pypi.org/simple
uvloop==0.21.0
# via uvicorn
# from https://pypi.org/simple
watchfiles==0.24.0
# via uvicorn
# from https://pypi.org/simple
websockets==13.1
# via uvicorn
# from https://pypi.org/simple
wheel==0.44.0
# from https://pypi.org/simple
149 changes: 149 additions & 0 deletions src/requirements/g00006/python3.10-torch2.0.1-cu118.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
# This file was autogenerated by uv via the following command:
# uv pip compile --python-platform x86_64-unknown-linux-gnu --emit-index-url --emit-find-links --emit-build-options --emit-index-annotation --extra-index-url https://download.pytorch.org/whl/cu118 --index-url https://pypi.org/simple --index-strategy first-index -
--index-url https://pypi.org/simple
--extra-index-url https://download.pytorch.org/whl/cu118

annotated-types==0.7.0
# via pydantic
# from https://pypi.org/simple
anyio==4.6.2.post1
# via
# starlette
# watchfiles
# from https://pypi.org/simple
attrs==23.2.0
# via cog
# from https://pypi.org/simple
certifi==2022.12.7
# via requests
# from https://download.pytorch.org/whl/cu118
charset-normalizer==2.1.1
# via requests
# from https://download.pytorch.org/whl/cu118
click==8.1.7
# via uvicorn
# from https://pypi.org/simple
cmake==3.25.0
# via triton
# from https://download.pytorch.org/whl/cu118
cog @ https://github.com/replicate/cog/archive/2f883e462e0e0606e38a1d05ef5d02bfe43fa19e.zip
exceptiongroup==1.2.2
# via anyio
# from https://pypi.org/simple
fastapi==0.110.3
# via cog
# from https://pypi.org/simple
filelock==3.13.1
# via
# torch
# triton
# from https://download.pytorch.org/whl/cu118
h11==0.14.0
# via uvicorn
# from https://pypi.org/simple
httptools==0.6.2
# via uvicorn
# from https://pypi.org/simple
idna==3.4
# via
# anyio
# requests
# from https://download.pytorch.org/whl/cu118
jinja2==3.1.3
# via torch
# from https://download.pytorch.org/whl/cu118
lit==15.0.7
# via triton
# from https://download.pytorch.org/whl/cu118
markupsafe==2.1.5
# via jinja2
# from https://download.pytorch.org/whl/cu118
mpmath==1.3.0
# via sympy
# from https://download.pytorch.org/whl/cu118
networkx==3.2.1
# via torch
# from https://download.pytorch.org/whl/cu118
numpy==1.26.3
# via torchvision
# from https://download.pytorch.org/whl/cu118
pillow==10.2.0
# via torchvision
# from https://download.pytorch.org/whl/cu118
pip==24.2
# from https://pypi.org/simple
pydantic==2.9.2
# via
# cog
# fastapi
# from https://pypi.org/simple
pydantic-core==2.23.4
# via pydantic
# from https://pypi.org/simple
python-dotenv==1.0.1
# via uvicorn
# from https://pypi.org/simple
pyyaml==6.0.2
# via
# cog
# uvicorn
# from https://pypi.org/simple
requests==2.28.1
# via
# cog
# torchvision
# from https://download.pytorch.org/whl/cu118
setuptools==70.0.0
# from https://download.pytorch.org/whl/cu118
sniffio==1.3.1
# via anyio
# from https://pypi.org/simple
starlette==0.37.2
# via fastapi
# from https://pypi.org/simple
structlog==24.4.0
# via cog
# from https://pypi.org/simple
sympy==1.12
# via torch
# from https://download.pytorch.org/whl/cu118
torch==2.0.1+cu118
# via
# torchaudio
# torchvision
# triton
# from https://download.pytorch.org/whl/cu118
torchaudio==2.0.2+cu118
# from https://download.pytorch.org/whl/cu118
torchvision==0.15.2+cu118
# from https://download.pytorch.org/whl/cu118
triton==2.0.0
# via torch
# from https://download.pytorch.org/whl/cu118
typing-extensions==4.9.0
# via
# anyio
# cog
# fastapi
# pydantic
# pydantic-core
# torch
# uvicorn
# from https://download.pytorch.org/whl/cu118
urllib3==1.26.13
# via requests
# from https://download.pytorch.org/whl/cu118
uvicorn==0.32.0
# via cog
# from https://pypi.org/simple
uvloop==0.21.0
# via uvicorn
# from https://pypi.org/simple
watchfiles==0.24.0
# via uvicorn
# from https://pypi.org/simple
websockets==13.1
# via uvicorn
# from https://pypi.org/simple
wheel==0.44.0
# from https://pypi.org/simple
Loading

0 comments on commit 05c47dd

Please sign in to comment.