R
Railway16mo 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
Percy16mo ago
Project ID: 21c22b76-3eeb-4e49-8c44-af1f48a72060,b1ea6565-9ca2-485e-8f39-be6b7f6cbbe9
Brody
Brody16mo 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
ThorgeOP16mo ago
yes, just formatted! and thanks, just redeployed to test again
Brody
Brody16mo ago
chill with the edits
Thorge
ThorgeOP16mo ago
yeah sorry just wanted to include the error message think my message disappeared
Brody
Brody16mo ago
it wasnt deleted by the bot
Thorge
ThorgeOP16mo 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
ThorgeOP16mo ago
Any idea what might be going on? sry for the edits
Brody
Brody16mo ago
so is this a python app or a node app?
Thorge
ThorgeOP16mo ago
python fastapi server im just installing node to install prisma which is used by the python prisma port (IIRC)
Brody
Brody16mo ago
i thought it was a native python package double check that
Thorge
ThorgeOP16mo ago
yeah I think the command lines commands still use the regular prima commands
Brody
Brody16mo ago
so yes it does need node?
Thorge
ThorgeOP16mo ago
yes is that a problem?
Brody
Brody16mo ago
no, just odd send full logs please
Thorge
ThorgeOP16mo 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
Brody16mo ago
kinda cringe Microsoft, not supporting openssl 1
Thorge
ThorgeOP16mo 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
ThorgeOP16mo 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
Brody16mo ago
bruh your already defining your nixPkgs in the nixpacks.toml file
Thorge
ThorgeOP16mo ago
what do u mean
Brody
Brody16mo ago
🤨
Thorge
ThorgeOP16mo ago
sorry brah
Brody
Brody16mo 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
ThorgeOP16mo ago
so I can define the openssl version in nixpacks.toml?
Thorge
ThorgeOP16mo ago
okay sweet, got it. this is new deployment error log. trying to debug it rn
Brody
Brody16mo ago
send your nixpacks.toml file
Thorge
ThorgeOP16mo ago
yeah I just fixed by ditching microsoft cant deal with that shit anymore
Brody
Brody16mo ago
lmfao what did you use instead
Solution
Thorge
Thorge16mo ago
www.unrealspeech.com
Thorge
ThorgeOP16mo ago
just was on a call with the founder he send over code snippet, things worked in 30 seconds
Brody
Brody16mo ago
ay i love that yeah thats 1000% a better solution
Thorge
ThorgeOP16mo ago
yeah thanks for the help anyways and being patient with me lmao
Brody
Brody16mo 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
ThorgeOP16mo ago
yeah good point
Morning730
Morning73013mo ago
So, is it still not possible to install azure-cognitiveservices-speech on the HAHAHA
Want results from more Discord servers?
Add your server