glibc missing from deployment
I have a simple fastapi python server running on railway, that uses libreoffice in headless mode to convert a docx to a pdf. I keep on running into an error on api invocation that tells me
I've ensured that they're installed with my deployment config
I did see in another thread that setting nixpacks to 1.15.0 could help, but neither the latest (no version specified) nor 1.15.0 work for this issue.
Project ID:
11af6aaa-78aa-4cb0-bf8b-a5e6dfafc4b9
Any help would be greatly appreciated 🙏Solution:Jump to solution
give this Dockerfile a try
```dockerfile
FROM python:3.10
ENV PYTHONFAULTHANDLER=1...
21 Replies
Project ID:
11af6aaa-78aa-4cb0-bf8b-a5e6dfafc4b9
i think ive helped another user run a deploy that used libreoffice in some capacity, we ended up using a dockerfile, let me see if i can find it, otherwise ill write you a new one
nope, can't find it, can you share your repo so that i can see about writing you a dockerfile?
of course, could I get your github username please?
brody192
ok, shared! the api route itself is /retrieve/docx
i havent gotten any emails or gh notifications
got it now
I just removed and re-added, it should show up soon
looking
what version of python do you use locally
3.10
Solution
give this Dockerfile a try
if there are build errors use this to download the logs and then send them here https://bookmarklets.up.railway.app/log-downloader/
silly question - but it's simply copied and pasted into
Dockerfile
right?
I got ERROR: failed to solve: dockerfile parse error on line 3: unknown instruction: PYTHONFAULTHANDLER=1
well i knew something felt off, my bad
all good, I really appreciate the help
fixed
seems like the build passed fine, now I get the following when trying to start
Error: Invalid value for '--port': '$PORT' is not a valid integer.
the $PORT var is supposed to be the port railway assignsnew railway.json
i assume you're doing
railway up
since i dont see the Dockerfile in your repo?ah - sorry, it was copied over from a monorepo
oh, gotcha
ok! seems like I'm not getting the errors anymore (at least, they're not related to glibc), thank you for the help!
awsome!