Skip to content

Commit

Permalink
enh: add torch CPU install
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Jun 14, 2024
1 parent 880a3cb commit 4466561
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions prepare_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ def get_package_versions(packages, packages_pinned):
version_dict = {}
for pkg in packages:
mod = importlib.import_module(get_import_name(pkg))
version_dict[pkg] = mod.__version__
version_dict[pkg] = mod.__version__.split("+")[0]
for pkgv in packages_pinned:
pk, ver = pkgv.split("==")
pmod = importlib.import_module(get_import_name(pk))
pver = pmod.__version__
pver = pmod.__version__.split("+")[0]
if pver != ver:
raise ValueError(
f"Package {pk} should be {ver}, but is {pver}")
Expand Down
6 changes: 4 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
chipstream[CLI]==0.5.0
dclab==0.59.1
dcnum==0.22.1
dcnum==0.23.4
dcoraid==0.14.2
h5py==3.11.0
numpy==1.26.4
scikit-image==0.23.1 # no-upgrade
scipy==1.11.4 # no-upgrade
scipy==1.11.4 # no-upgrade
torch==2.3.1 # no-upgrade
torchvision==0.18.1 # no-upgrade
3 changes: 3 additions & 0 deletions win_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ python3 -m pip install --upgrade pip wheel
python3 -m pip install --upgrade pyinstaller
python3 -m pip install msvc-runtime

# Install CPU versions of torch (smaller file size)
pip install torch==2.3.1+cpu torchvision-cpu==0.18.1+cpu -f https://download.pytorch.org/whl/torch_stable.html

# upgrade packages
pip install -r requirements.txt

Expand Down

0 comments on commit 4466561

Please sign in to comment.