karlicoss / promnesia

Another piece of your extended mind
https://beepb00p.xyz/promnesia.html
MIT License
1.73k stars 74 forks source link

Use setup.py to install dependencies in docker #434

Open wilt00 opened 8 months ago

wilt00 commented 8 months ago

While building from the Dockerfile, I ran into some issues caused by pip resolving sqlalchemy to v1 instead of v2. This PR changes the Dockerfile to install directly from setup.py, rather than indirectly from a list of dependencies, to hopefully prevent issues like this from coming up in the future.

It looks like the reason we originally went with the individual dependencies approach is because setuptools-scm needs to get the version from the git history. Since we don't want to bloat the container by copying the entire git history into it, setuptools-scm can't find the version and the installation fails. Since then, it looks like setuptools-scm has added an override environment variable which we can use to pass in a version explicitly during the build.

karlicoss commented 7 months ago

Thanks! Sorry just noticed -- somehow didn't receive the email notification

wilt00 commented 7 months ago

Sorry for the drive-by PR @karlicoss ! I've finally fixed the CI issues here.