Deploy issue with Python PIL/Pillow and libwebp.so.7 not found
I'm running into what seems like a fairly simple deploy issue:
In my earlier attempts, I simply couldn't get the package to build, so I updated the
railway.json
file to include the build dependencies.
Here is my railway.json
file:
The custom build command is:
This all works fine with the exception of the inability to import the image library. My best guess, because I'm only partway though a lot of the docs, is that perhaps the setup phase packages aren't included in the final image layer?
Does anyone have any ideas I could try?9 Replies
Project ID:
N/A
Project ID: 26158cd2-ea48-4b82-815a-a7bfdc2a83bd
you have gotten extremely far, and I think you are correct with your assumption on why it doesn't work, those packages are getting installed but aren't included in the final image, or maybe the library paths aren't being updated, something along those lines.
solution being, use a Dockerfile based build and install all those same packages
Yea - I can switch it to docker if I have to I suppose.
It's an OCI container at the end either way
Dockerfile also gives you far more control
The nixpack stuff seemed fun though, and also to be the default. Usually I try to go with as much default as possible as it's often the happy path.
But I can setup a decent multistage dockerfile and call it a day
Railway will always support Dockerfiles, after all, nixpacks is literally putting together a dockerfile
That's cool - I didn't know it just built a dockerfile under the hood.
I assumed it was some bespoke custom OCI complaint container generator 😄
yep! so if you're comfortable with Dockerfiles, writing one yourself is going to give you far more control