R
Railway

✋|help

Problem installing dlib library in my railway environment

Ssshaat5/21/2023
Project ID: 841bbdef-4033-4e74-953c-030beb316802 Project code: https://github.com/SeifShaat/Divine-Smile/tree/main I'm trying to install dlib in my railway environment because it's needed in my python script. dlib requires CMake to be installed first so I wrote CMake, dlib, numpy and opencv-python in a requirements.txt file and committed it but for some reason dlib doesnt install because it keeps saying that CMake has to be installed. Can anyone please help? Relevant log: #11 11.86 × Running setup.py install for dlib did not run successfully. #11 11.86 │ exit code: 1 #11 11.86 ╰─> [8 lines of output] #11 11.86 running install #11 11.86 running build #11 11.86 running build_py #11 11.86 package init file 'tools/python/dlib/__init__.py' not found (or not a regular file) #11 11.86 running build_ext #11 11.86 #11 11.86 ERROR: CMake must be installed to build dlib #11 11.86 #11 11.86 [end of output]
GitHub
GitHub - SeifShaat/Divine-Smile
Contribute to SeifShaat/Divine-Smile development by creating an account on GitHub.
PPercy5/21/2023
Project ID: 841bbdef-4033-4e74-953c-030beb316802
BBrody5/21/2023
can i ask why you had a railway.yaml file?
Ssshaat5/21/2023
I've tried a couple of things using chatgpt and railway.yaml was one of his answers
BBrody5/21/2023
i thought so full build logs please in .txt format if you could
Ssshaat5/21/2023
sure 1 sec
Ssshaat5/21/2023
Ssshaat5/21/2023
I just started using railway today for the first time, so it's a bit hard for me to grasp
BBrody5/21/2023
[phases.setup]
nixPkgs = ["...", "cmake"]
[phases.setup]
nixPkgs = ["...", "cmake"]
this is untested, but try adding that as a nixpacks.toml file in your project
Ssshaat5/21/2023
okay I'll try, 1 sec returned a new error, want me to send over the full logs?
BBrody5/21/2023
yes please
Ssshaat5/21/2023
BBrody5/21/2023
[phases.setup]
nixPkgs = ["...", "cmake"]
aptPkgs = ["...", "libcrypt-dev"]
[phases.setup]
nixPkgs = ["...", "cmake"]
aptPkgs = ["...", "libcrypt-dev"]
try this
Ssshaat5/21/2023
sure 1 sec still getting errors
Ssshaat5/21/2023
here's the log
Ssshaat5/21/2023
@Brody still there?
BBrody5/22/2023
I'm making dinner actually, but if you give me some minimal reproducible code I will give it another crack later tonight
Ssshaat5/22/2023
sorry, what exactly do you mean by minimal reproducible code?
Ssshaat5/22/2023
whenever you're free, you can check out my repository, it includes my code 'main.py' and the other 2 files referenced in the 'main.py' and the requirements.txt file which is the file that has the main problem I think. 'mainpy' is a 63 line code basically a minimal code and its fully commented in each line to clarify what exactly it's supposed to do. keep in mind that the problem im facing isnt in the main code for now but rather in the imported libraries that's used in the code (1 library to be exact 'dlib'). would that be okay?
BBrody5/22/2023
please read over this, your repo is not what this guide would call minimal. there's not much else I can do at this point without a minimal example to do tests with
Ssshaat5/22/2023
The problem isn't in the code. the problem is that railway doesn't execute the pip command to install the requirements.txt successfully. the code itself is irrelevant to the problem except for the part where I import those packages, everything else in the code doesn't come into play when trying to solve this error. Basically the problem is in the requirements.txt once that problem is fixed it's done. would you like me to send over the requirements.txt file?
BBrody5/22/2023
i know your code is irrelevant, I'm just asking for you to make this just a tad easier for me, because as it stands, I'd have to download a repo with a 100mb file in it if you could provide me with a repo, that excludes this file, that would be great
Ssshaat5/22/2023
I wanna make things easier for you. And thank you by the way for helping me so far I really appreciate it. I'm a bit new to programming. I'm currently a student so this is a bit hard for me.
BBrody5/22/2023
so I'd just like a repo with the minimal amount of files/code that still produces the same build error as your full repo
Ssshaat5/22/2023
Okay 1 sec I'll give it a try
BBrody5/22/2023
okay but I'm only able to chat because I'm on my phone right now, I won't be able to do any tests until later tonight, so that gives you plenty of time
Ssshaat5/22/2023
https://github.com/SeifShaat/Divine-Smile/tree/main check this repo. it doesnt have any big files just the main code and the requirements.txt and the nixpacks.toml file you told me to create. would that be okay?
GitHub
GitHub - SeifShaat/Divine-Smile
Contribute to SeifShaat/Divine-Smile development by creating an account on GitHub.
BBrody5/22/2023
yep that's what I'm talking about, thank you I will get back to this later!
Ssshaat5/22/2023
Okay, take your time. Thanks in advance
BBrody5/22/2023
@SShaat - turns out it wasn't too complicated after all. 1. delete the nixpacks.toml file 2. replace your requirements.txt with this
flask==2.3.2
opencv-python-headless==4.7.0.72
numpy==1.24.3
dlib-binary==19.24.1
gunicorn==20.1.0
flask==2.3.2
opencv-python-headless==4.7.0.72
numpy==1.24.3
dlib-binary==19.24.1
gunicorn==20.1.0
3. add a .python-version with this in it
3.10
3.10
4. add a Procfile with this in it
web: gunicorn main:app
web: gunicorn main:app
5. make sure you don't have a build or start command defined in the railway service settings with these changes, that minimal repo does build
Ssshaat5/22/2023
sorry is the .python-version a file named like that?
BBrody5/22/2023
that's correct, that's the name of the file
Ssshaat5/22/2023
okay I'll try Thank you so much. It worked. I pushed my original files back and it deployed and working. Thanks again mind if I ask here if I run into any problem?
BBrody5/22/2023
awesome, glad I could help! of course, as long as the questions relate to railway in some way
Ssshaat5/22/2023
yea ofc. Thanks again.
Ssshaat5/22/2023
hey @Brody, I started using railway because I wanted to push a flask python script to host it on railway to be able to use it in my flutter app. The python script uses opencv and dlib to process facial features specifically to measure the distance between both eyebrows and the nose tip. I set up a camera system in my flutter app but have trouble sending the frames captured by the flutter camera to the python script to be processed and back to flutter to display. Can you help me with that? Thanks in advance
BBrody5/22/2023
I might be able to, what seems to be the problem

Looking for more? Join the community!

Want results from more Discord servers?
Add your server
Recommended Posts
I am trying to deploy a react-scripts app the build is done but it is taking forever to deployit has been 15 mins now and still nothing it was 20 mins earlier when I decided to change http-servegunicorn: command not found (Django)I have gunicorn in my requirement.txt file in my django application i am trying to deploy but it thrError: Unable to access jarfile target/*jarProject ID: a7e9764d-13dd-40c9-a428-41835b4bc576 I have a project when deploy Java Spring Boot, can DeviantArt RSS is blocking Railway's IPI have a bot that pulls a user's art from the RSS feed associated with their account. For a couple oquestionsso i hv a question if i hosted a website on localhost1400 smtg like tht how do i view tht websiteLinkOnde que eu vejo o link da api?Avoid automatic deploy if commit message starts with certain textHow could I make railway avoid doing an automatic deploy if the commit message starts, for example, How to connect to my Soketi project in RailwayBased on the example of using Pusher in the website [soketi.app](https://soketi.app/), how do I getHow does Database scaling work with horizontal scaling?Today horizontal scaling was introduced, and it works on a test server I have. But, I don't have a dA few questions about developer plan1) Can i connect my external domain to this hosting when i buy developer plan? 2) "Credit-based subsinfoafter i hv used up all my hours will i get those hours again next month or smtg?Unable to login with GitHubKeep getting an "Internal Server Error"How to use a new MySQL user for database connections?I have created a new database in MySQL using Workbench and a new user for that database using the RaHow to create a remoteuser for MySQL Workbench connection?Hi. I used the Railway CLI to create a new remoteuser in MySQL. Then, I attempted to connect to the Application failed to respondMy nx app get that error: ```bash yarn run v1.22.19 $ nx serve app --prod --port 5564 > nx run app:Error on SELECT Queries MySQLSo I have my API in JS deployed with an MySQL DB, I can run any Query but SELECTS, even with ThunderUnable to upload codeHi there, I'm trying to upload my project to railway as for hosting it... Using railway's CLI, I'veGithub Not WorkingI can't find any of my github projectsInternal server error when I try to login with GitHubI don’t have my project ids. Happy to DM my Github info.Docker ran out of memory? Developer planBuild are crashing with this message from docker: >>>7H35BIQK: no space left on device How do you