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
Project ID:
N/A
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.
4307b53e-efe0-435e-b58f-58d526d22e43
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?
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
fulls logs might help in this case
question where can I find the full Logs? As I can only see two which are Build and Deploy Logs
The build logs are the logs related to compiling your app and building the environment. Deploy logs have everything else
Here's the build log btw
It seems that I cannot install tensorflow-intel in railway but on my localhost it works perfectly fine
what python version do you use locally
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
true! but railway does use intel cpus
that may not always be the case though
We do use Intel CPUs
you heard it here folks, I'm not making stuff up
I see. I tried uninstalling tensorflow but another problem pops up. It seems that I am not able to use cv2. Is it supported?
yes, use the headless version though
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.