Metacreation-Lab / autolume

https://www.metacreation.net/autolume
19 stars 2 forks source link

consider using Poetry (or similar) rather than scripts for install #1

Open cpmpercussion opened 1 month ago

cpmpercussion commented 1 month ago

Hi folks,

I've been playing with Autolume a bit and found it the install scripts a bit tricky to work with. I got it to work on Windows with the PowerShell script eventually but couldn't seem to get things happening on Linux.

In my projects I've found that using Poetry to track dependencies is a lot more flexible and reliable and so I ended up just making a Poetry pyproject.toml file that successfully runs Autolume (see below).

One issue is packages like ndi-python have quite broken pypi releases (like 5.1.1.1 has Windows, macOS binaries, 5.1.1.2 has manylinux x86_64, 5.1.1.5 is just macOS aarch64...) and the source distribution doesn't seem to build. So one requirements.txt will not be able to cope with this situation but if ndi-python is needed, you could point different platforms/architectures to different versions with Poetry's dependency specifications. (E.g., similarly as for tensorflow in this project.

Anyway, not making demands here really, just a suggestion and maybe telling the story about how I got autolume to run if it's helpful :-)

Poetry pyproject.toml file -- should produce a valid lock file with poetry lock, create virtualenv with poetry install and run with poetry run python main.py (passes the "Works on My Machine" certification program anyway....)

[tool.poetry]
name = "autolume"
version = "0.1.0"
description = ""
authors = ["Your Name <you@example.com>"]
readme = "README.md"
package-mode = false

[tool.poetry.dependencies]
python = "~3.10"
clip = { git = "https://github.com/openai/CLIP.git", rev = "a9b1bf5920416aaeaec965c25dd9e8f98c864f16" }
click = "^8.1.7"
torch = "^2.3.0"
torchvision = "^0.18.0"
torchaudio = "^2.3.0"
ffmpeg-python = "^0.2.0"
opencv-python = "^4.9.0.80"
imgui = "1.4.1"
glfw = "^2.7.0"
pyopengl = "^3.1.7"
requests = "^2.32.2"
matplotlib = "^3.9.0"
scikit-learn = "^1.5.0"
scikit-image = "^0.23.2"
tqdm = "^4.66.4"
fbpca = "^1.0"
python-osc = "^1.8.3"
seaborn = "^0.13.2"
kmeans-pytorch = "^0.3"
psutil = "^5.9.8"
kornia = "^0.7.2"
pyaudio = "^0.2.14"
ndi-python = "5.1.1.2"
pyyaml = "^6.0.1"
librosa = "^0.10.2.post1"
opensimplex = "^0.4.5.1"
lpips = "^0.1.4"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"