R
Railway13mo ago
N.

Custom ML Model Deployment

Hi ! I am currently developing a project which utlizes a custom face recognition model. Question is, am I able to deploy the model via an API in railway? I am having this issue on the deployment.
20 Replies
Percy
Percy13mo ago
Project ID: N/A
N.
N.13mo ago
N.
N.13mo ago
Github Repo: https://github.com/R-esentful/dlsud-sams-react Possible Root cause: OPENCV / MODEL integration issue on file directory /backend/api/attendance.py
GitHub
GitHub - R-esentful/dlsud-sams-react
Contribute to R-esentful/dlsud-sams-react development by creating an account on GitHub.
N.
N.13mo ago
4307b53e-efe0-435e-b58f-58d526d22e43
Brody
Brody13mo ago
those are not the full logs, so if I had to take a wild guess, your model file was not found. does your github repo store any files with sizes above 90mb?
N.
N.13mo ago
Hmmmm. I believe I dont have any files with sizes above 90mb. I am only deploying the backend code tho. As for the model, It was working earlier on my localhost. I might check if there are missing dependencies which was not included on the requirements.txt
Brody
Brody13mo ago
fulls logs might help in this case
N.
N.13mo ago
question where can I find the full Logs? As I can only see two which are Build and Deploy Logs
Adam
Adam13mo ago
The build logs are the logs related to compiling your app and building the environment. Deploy logs have everything else
N.
N.13mo ago
Here's the build log btw
N.
N.13mo ago
N.
N.13mo ago
It seems that I cannot install tensorflow-intel in railway but on my localhost it works perfectly fine
Brody
Brody13mo ago
what python version do you use locally
Adam
Adam13mo ago
Also instead of specifying tensorflow intel, just specify tensorflow tensorflow intel only works on intel CPUs. Best to install the general version and have it figure the version out itsself
Brody
Brody13mo ago
true! but railway does use intel cpus that may not always be the case though
angelo
angelo13mo ago
We do use Intel CPUs
Brody
Brody13mo ago
you heard it here folks, I'm not making stuff up
N.
N.13mo ago
I see. I tried uninstalling tensorflow but another problem pops up. It seems that I am not able to use cv2. Is it supported?
Brody
Brody13mo ago
yes, use the headless version though
N.
N.13mo ago
Daaang thanks for the help guys. Really appreciate it! Here's the curent result on the deployment. I removed other dependencies beside tensorflow as what Adam suggested, used opencv-python-headless which was suggested by brody. I'll look unto the result tomorrow if the model I integrated works.