R
Railway11mo ago
Thorge

Fix Missing libuuid Library

Hey, I am currently runnig into problems deploying my FastAPI backend after adding a new dependency to my requirements.txt (azure-cognitiveservices-speech==1.31.0). project and service id: project/21c22b76-3eeb-4e49-8c44-af1f48a72060/service/b1ea6565-9ca2-485e-8f39-be6b7f6cbbe9 Error:
File "/opt/venv/lib/python3.10/site-packages/azure/cognitiveservices/speech/__init__.py", line 8, in <module>

from .speech import *

File "/opt/venv/lib/python3.10/site-packages/azure/cognitiveservices/speech/speech.py", line 13, in <module>

from .interop import (

File "/opt/venv/lib/python3.10/site-packages/azure/cognitiveservices/speech/interop.py", line 20, in <module>

_sdk_lib = load_library.LoadLibrary(lib_path)

File "/root/.nix-profile/lib/python3.10/ctypes/__init__.py", line 452, in LoadLibrary

return self._dlltype(name)

File "/root/.nix-profile/lib/python3.10/ctypes/__init__.py", line 374, in __init__

self._handle = _dlopen(self._name, mode)

OSError: libuuid.so.1: cannot open shared object file: No such file or directory
File "/opt/venv/lib/python3.10/site-packages/azure/cognitiveservices/speech/__init__.py", line 8, in <module>

from .speech import *

File "/opt/venv/lib/python3.10/site-packages/azure/cognitiveservices/speech/speech.py", line 13, in <module>

from .interop import (

File "/opt/venv/lib/python3.10/site-packages/azure/cognitiveservices/speech/interop.py", line 20, in <module>

_sdk_lib = load_library.LoadLibrary(lib_path)

File "/root/.nix-profile/lib/python3.10/ctypes/__init__.py", line 452, in LoadLibrary

return self._dlltype(name)

File "/root/.nix-profile/lib/python3.10/ctypes/__init__.py", line 374, in __init__

self._handle = _dlopen(self._name, mode)

OSError: libuuid.so.1: cannot open shared object file: No such file or directory
I tried installing it in my nixpacks.toml file, but it still doesn't work
[phases.validate_libuuid]
cmds = ["ldconfig -p | grep libuuid"]
dependsOn = ["setup"]


# Add a new phase for installing the Prisma CLI
[phases.install_prisma]
cmds = ["npm install -g prisma","which python","python --version"]
dependsOn = ["install"]

# Add a new phase for Prisma generation
[phases.prisma_generate]
cmds = ["prisma generate --schema ./trellis_backend/prisma/schema.prisma"]
dependsOn = ["install_prisma"]

# Update the build phase to depend on the new 'prisma_generate' phase
[phases.build]
dependsOn = ["...", "prisma_generate"]
[phases.validate_libuuid]
cmds = ["ldconfig -p | grep libuuid"]
dependsOn = ["setup"]


# Add a new phase for installing the Prisma CLI
[phases.install_prisma]
cmds = ["npm install -g prisma","which python","python --version"]
dependsOn = ["install"]

# Add a new phase for Prisma generation
[phases.prisma_generate]
cmds = ["prisma generate --schema ./trellis_backend/prisma/schema.prisma"]
dependsOn = ["install_prisma"]

# Update the build phase to depend on the new 'prisma_generate' phase
[phases.build]
dependsOn = ["...", "prisma_generate"]
Solution:
www.unrealspeech.com
Jump to solution
40 Replies
Percy
Percy11mo ago
Project ID: 21c22b76-3eeb-4e49-8c44-af1f48a72060,b1ea6565-9ca2-485e-8f39-be6b7f6cbbe9
Brody
Brody11mo ago
please enclose code blocks with tripple backticks as for the missing libuuid try adding this to your nixpacks.toml file
[phases.setup]
nixPkgs = ['...', 'libuuid']
nixLibs = ['...', 'libuuid']
[phases.setup]
nixPkgs = ['...', 'libuuid']
nixLibs = ['...', 'libuuid']
Thorge
Thorge11mo ago
yes, just formatted! and thanks, just redeployed to test again
Brody
Brody11mo ago
chill with the edits
Thorge
Thorge11mo ago
yeah sorry just wanted to include the error message think my message disappeared
Brody
Brody11mo ago
it wasnt deleted by the bot
Thorge
Thorge11mo ago
I'm running into other problems with the azure package when I try to call the tts code. I need to install more dependencies according: https://learn.microsoft.com/en-us/azure/ai-services/speech-service/quickstarts/setup-platform?pivots=programming-language-csharp&tabs=linux%2Crhel-centos%2Cdotnetcli%2Cdotnet%2Cjre%2Cmaven%2Cnodejs%2Cmac%2Cpypi current nixpacks:
# nixpacks.toml

# Include auto-detected provider and Python provider
providers = ["..."]

# Install Node.js and other required packages during the setup phase
[phases.setup]
nixPkgs = ["...", "nodejs", "libuuid"]
nixLibs = ['...', 'libuuid']
aptPkgs = ["...", "libssl-dev", "build-essential", "ca-certificates", "libasound2", "wget"]


[phases.validate_libuuid]
cmds = ["ldconfig -p | grep libuuid"]
dependsOn = ["setup"]


# Add a new phase for installing the Prisma CLI
[phases.install_prisma]
cmds = ["npm install -g prisma","which python","python --version"]
dependsOn = ["install"]

# Add a new phase for Prisma generation
[phases.prisma_generate]
cmds = ["prisma generate --schema ./trellis_backend/prisma/schema.prisma"]
dependsOn = ["install_prisma"]

# Update the build phase to depend on the new 'prisma_generate' phase
[phases.build]
dependsOn = ["...", "prisma_generate"]
# nixpacks.toml

# Include auto-detected provider and Python provider
providers = ["..."]

# Install Node.js and other required packages during the setup phase
[phases.setup]
nixPkgs = ["...", "nodejs", "libuuid"]
nixLibs = ['...', 'libuuid']
aptPkgs = ["...", "libssl-dev", "build-essential", "ca-certificates", "libasound2", "wget"]


[phases.validate_libuuid]
cmds = ["ldconfig -p | grep libuuid"]
dependsOn = ["setup"]


# Add a new phase for installing the Prisma CLI
[phases.install_prisma]
cmds = ["npm install -g prisma","which python","python --version"]
dependsOn = ["install"]

# Add a new phase for Prisma generation
[phases.prisma_generate]
cmds = ["prisma generate --schema ./trellis_backend/prisma/schema.prisma"]
dependsOn = ["install_prisma"]

# Update the build phase to depend on the new 'prisma_generate' phase
[phases.build]
dependsOn = ["...", "prisma_generate"]
error: https://codeshare.io/OdbNl0
Install the Speech SDK - Azure AI services
In this quickstart, you'll learn how to install the Speech SDK for your preferred programming language.
Thorge
Thorge11mo ago
Any idea what might be going on? sry for the edits
Brody
Brody11mo ago
so is this a python app or a node app?
Thorge
Thorge11mo ago
python fastapi server im just installing node to install prisma which is used by the python prisma port (IIRC)
Brody
Brody11mo ago
i thought it was a native python package double check that
Thorge
Thorge11mo ago
yeah I think the command lines commands still use the regular prima commands
Brody
Brody11mo ago
so yes it does need node?
Thorge
Thorge11mo ago
yes is that a problem?
Brody
Brody11mo ago
no, just odd send full logs please
Thorge
Thorge11mo ago
this seems to be the problem: The Speech SDK does not yet support OpenSSL 3.0, which is the default in Ubuntu 22.04 and Debian 12. locally, I have: OpenSSL 1.1.1u 30 May 2023 on railway, I have: OpenSSL 3.0.7 1 Nov 2022
Brody
Brody11mo ago
kinda cringe Microsoft, not supporting openssl 1
Thorge
Thorge11mo ago
yeah super annoying im getting destroyed over here trying to downgrade openssll with these environment variables NIXPACKS_DEBIAN 1 NIXPACKS_NIX_PKG openssl but shit hits the fan when deploying
Thorge
Thorge11mo ago
do u see any solution that I could try to get this thing to work? saw this other comment of you that newer nixpacks versions are likely only using openssl 3
Brody
Brody11mo ago
bruh your already defining your nixPkgs in the nixpacks.toml file
Thorge
Thorge11mo ago
what do u mean
Brody
Brody11mo ago
🤨
Thorge
Thorge11mo ago
sorry brah
Brody
Brody11mo ago
you are already defining your nix packages in the nixpacks.toml file, don't go defining nix packages in the environment variables too NIXPACKS_DEBIAN = 1 should be sufficient
Thorge
Thorge11mo ago
so I can define the openssl version in nixpacks.toml?
Thorge
Thorge11mo ago
okay sweet, got it. this is new deployment error log. trying to debug it rn
Brody
Brody11mo ago
send your nixpacks.toml file
Thorge
Thorge11mo ago
yeah I just fixed by ditching microsoft cant deal with that shit anymore
Brody
Brody11mo ago
lmfao what did you use instead
Solution
Thorge
Thorge11mo ago
www.unrealspeech.com
Thorge
Thorge11mo ago
just was on a call with the founder he send over code snippet, things worked in 30 seconds
Brody
Brody11mo ago
ay i love that yeah thats 1000% a better solution
Thorge
Thorge11mo ago
yeah thanks for the help anyways and being patient with me lmao
Brody
Brody11mo ago
always avoid clunky deps if possible, they just cause more headaches then needed and while youre at it, maybe use an orm that doesnt need a whole other programing language installed lol the slimmer you can get your app, generally the more performant it will be, plus less resource usage so lower railway bills
Thorge
Thorge11mo ago
yeah good point
Morning730
Morning7309mo ago
So, is it still not possible to install azure-cognitiveservices-speech on the HAHAHA