R
Railway2y ago
SHxKM

dependencies re-installed on every build

Django (Python) app . Railway is installing my dependencies on every build, even though no changes are made to requirements.txt. Project ID: fc77f02c-13c9-45e5-8d2f-d6c3dfc9188d I see this in the build logs:
#12 54.00 Using legacy 'setup.py install' for tornado, since package 'wheel' is not installed.
[......GOES ON FOR EVERY PACKAGE.......]

#12 55.25 Installing collected packages: zstandard, [.......GOES ON FOR EVERY PACKAGE.........]

#12 55.25 Running setup.py install for zstandard: started

#12 96.85 Running setup.py install for zstandard: finished with status 'done'

#12 96.86 Running setup.py install for wrapt: started

#12 97.88 Running setup.py install for wrapt: finished with status 'done'

#12 98.23 Running setup.py install for rjsmin: started
#12 54.00 Using legacy 'setup.py install' for tornado, since package 'wheel' is not installed.
[......GOES ON FOR EVERY PACKAGE.......]

#12 55.25 Installing collected packages: zstandard, [.......GOES ON FOR EVERY PACKAGE.........]

#12 55.25 Running setup.py install for zstandard: started

#12 96.85 Running setup.py install for zstandard: finished with status 'done'

#12 96.86 Running setup.py install for wrapt: started

#12 97.88 Running setup.py install for wrapt: finished with status 'done'

#12 98.23 Running setup.py install for rjsmin: started
My nixpacks.toml:
providers = ["python"]

[phases.setup]
> aptPkgs = ["libcurl4-openssl-dev", "libssl-dev", "libmemcached-dev", "libpq-dev", "python3-dev", "gcc", "g++", "libpq5", "python3-psycopg2"]
nixPkgs = ["postgresql_13", "python39", "libmemcached"]

[phases.build]
cmds = ["find / -name libpq.so.5 && export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/nix/store/redacted-postgresql-13.9-lib/lib/libpq.so.5"]


[start]
cmd = "ln -s /nix/store/redacted-postgresql-13.9-lib/lib/libpq.so.5 /usr/lib/libpq.so.5 && ln -s /nix/store/redacted-postgresql-13.9-lib/lib/libpq.so.5 /usr/lib64/libpq.so.5 && celery -A my_proj worker -c 6 -Q background -l info --workdir . -Ofair -n railwaybackgroundworker@%h"
providers = ["python"]

[phases.setup]
> aptPkgs = ["libcurl4-openssl-dev", "libssl-dev", "libmemcached-dev", "libpq-dev", "python3-dev", "gcc", "g++", "libpq5", "python3-psycopg2"]
nixPkgs = ["postgresql_13", "python39", "libmemcached"]

[phases.build]
cmds = ["find / -name libpq.so.5 && export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/nix/store/redacted-postgresql-13.9-lib/lib/libpq.so.5"]


[start]
cmd = "ln -s /nix/store/redacted-postgresql-13.9-lib/lib/libpq.so.5 /usr/lib/libpq.so.5 && ln -s /nix/store/redacted-postgresql-13.9-lib/lib/libpq.so.5 /usr/lib64/libpq.so.5 && celery -A my_proj worker -c 6 -Q background -l info --workdir . -Ofair -n railwaybackgroundworker@%h"
Builds are taking > 10 mins.
5 Replies
Percy
Percy2y ago
Project ID: fc77f02c-13c9-45e5-8d2f-d6c3dfc9188d
Percy
Percy2y ago
root
root2y ago
egad um Here's a better nixpacks.toml for you:
providers = ["python"]

[phases.setup]
nixPkgs = ["...", "postgresql_13", "libmemcached"]
nixLibs = ["...", "postgresql_13"]

[start]
cmd = "celery -A my_proj worker -c 6 -Q background -l info --workdir . -Ofair -n railwaybackgroundworker@%h"
providers = ["python"]

[phases.setup]
nixPkgs = ["...", "postgresql_13", "libmemcached"]
nixLibs = ["...", "postgresql_13"]

[start]
cmd = "celery -A my_proj worker -c 6 -Q background -l info --workdir . -Ofair -n railwaybackgroundworker@%h"
That should work.
SHxKM
SHxKM2y ago
@aleks Thanks. I don’t think you know my runtime dependencies? And how is this related to the requirements being re installed?
root
root2y ago
With the amount of customization you have in your nixpacks.toml, I think something in there might be breaking the caching.
Want results from more Discord servers?
Add your server