Great video, I am new to AWS but already an expert now with this video. For user in the Winscp, give appropriate default user name based the machine you select Amazon Linux: ec2-user Ubuntu: ubuntu Debian : admin
Thank you so much for posting this playlist. I am looking to switch my role as data scientist and I stuck in interviews when the interviewer asks about experience in production. I just got rejection from a great company but then I came to know about your video and replicated the deployment steps for different platforms. I am beyond grateful to you for the videos as I was able to learn deployment within a few days
Thank you So much sir . i was trying connect to AWS EC2 since from many Days . you have explained the Security setting and it worked for me. Many Thanks .
STOP and read this.... it will help you. Whole video is very good and educative but there is a problem with hypercorn command(hypercorn main:app --reload) at the end. When running it on localhost of your laptop ... its fine. But when running it on cloud you would have to explicitly give it host and post number .... otherwise you won't be able to access it using DNS or public IP of your EC2 instance Use this command on cloud terminal >>>>> hypercorn main:app --host 0.0.0.0 --port 8000 OR(if you are using uvicorn) Use this command >>>>> uvicorn main:app --host 0.0.0.0 --port 8000 hope it would help
This ML model deployment playlist is just too good.....there are some courses on udemy where in one course only teach you how to implement pickle objects through flask....really thanks for sharing such valuable content!! You are doing amazing work here!
thank you very much krish. The goal oriented explanation is what i liked the most in your videos i mean top to bottom approach. expecting more videos from you.
Step 6: We are not exactly generating a private key(already done by AWS). Basically we are converting a .pem private key to .ppk private key so that putty (SSH client can understand). Correct me if I am wrong. Thanks for the excellent video
I tried the steps....but in the end when I try to access the aws url for the deployed model it says "This site can’t be reached"...anything I would have missed ? Even the app.py file is running fine when ran in putty.
Can you tell me how to keep this server running 24*7? i.e. on closing the putty console it shuts down. How to make it run persistently so that it can be accessed from anywhere anytime?
Solution - search on google using "closing the putty console shuts down the site" and refer to the digitalocean website in the search result for the solution. You need to use the screen command in putty cmd. I hope this helps!
Very nice explanation krish. I have some doubts 1. How we can deploy multiple flask applications into one EC2 ubuntu instance? I want to deploy multiple flask applications into one EC2. 2. Is it possible to add multiple domains into single instance? for each flask application I want to add different domain
hey krish, One suggestion. it would be really helpful if you would mention the limits of the free service of the cloud servers. like in Heroku, if the size of the deployment file is above 300mb then it will slow down the process, etc. You are doing a great job and your videos helped me gain a lot of knowledge.
Thank you so much Krish Bhai for this! I have some queries, what are the benefits of using ec2 rather than Heroku? Heroku seemed easier to deploy and what is the free storage for both of them?
Sir, please make a video where this tutorial is done on ubuntu because we generally work on the Linux environment in the real industry, and windows have this software like putty and WinSCP so how to do deployment complete from the command line in ubuntu? please make a video on that too!
I tried deploying the CNN model it is working fine on localhost also seems good on ec2 instance but I am not able to see anything on that IP ... I have taken all the steps the same as your videos.
I am unable to connect using ec2-public ipv4. Even tried to connect using the ipv4 address .. doesnt work.curl localhost is giving correct results. I have used dockerfile to run the fastapi, can someone help me here?
Hi Sir, Can we also create a flask app, which takes input in the form of json (having only one data instance on which predictions are to be made). And if we deploy this app on EC2, will we have the cloud interact with our local system to upload that instance. Need Help Sir on this Please!
Krish, this video is fantastic. I have used Jupyter Notebook etc on AWS but have never deployed a bespoke API like this. One thing that isn't clear, how would you be able to host multiple services in the same instance. The URL for the instance contains no content that points to a particular web service.
Is it the port number 8080 that routes to the API we have installed? So if we required another we would use a different port number perhaps? Or can the URL be qualified?
I have a doubt for the web to start and run the python3 aap.py is to be written. but can we not host this permanently so that we can run it without writing this statement???
While deployment pipe install -r requirements.txt all the packages going to download but at the end (Permission denied: '/usr/local/lib/python3.7') on EC2 instance got this type of error. I tried in the various blogs but i didn't get the answer. So please help me how to solve this error
Hi Krish, thanks for the video with great content! One question: what could be the problem if my EC2 instance runs normally while my website have no response (show nothing)?
!Hi @Kunal, were you able to find a solution for this? I am also looking to keep my app active but if I close my ubuntu server through putty, it is closing the services. Please let me know.
Just found the solution. Search on google using "closing the putty console shuts down the site" and refer to the digitalocean website in the search result for the solution. You need to use the screen command in putty cmd. I hope this helps!
Hi Krish I have 2 questions 1) DO we have to keep putty open all the time and keep running our server? 2) When we are giving user the URL of our app. Do we need to give amazon url followed by port 8080?
Traceback (most recent call last): File "app.py", line 6, in model = pickle.load(open('model.pkl', 'rb')) ModuleNotFoundError: No module named 'sklearn.linear_model.base'
@@rahulbsadyanth8745 please import scikit learn(latest version) in model.py ,build a new pkl file and change the version of scikit learn in requirements.txt file. It will work
Sir I'm deploying another project, In putty it is showing me no module name tensorflow, but it is already installed during requirement.txt installation. What can I do?
I encountered an error while installing requirements.txt file in putty. ERROR: Could not find a version that satisfies the requirement altair==4.2.0 Can anyone help me with this ?
Please use only these packages which are mentioned in the github link and it will work. Flask==1.1.1 gunicorn==19.9.0 itsdangerous==1.1.0 Jinja2==2.10.1 MarkupSafe==1.1.1 Werkzeug==0.15.5 numpy>=1.9.2 scipy>=0.15.1 scikit-learn>=0.18 matplotlib>=1.4.3 pandas>=0.19
@@jaikishank I'm using streamlit. And now streamlit-webrtc is causing error. The error says unable to find wheel for 'some dependencies'. I felt irritated and tried deploying on streamlit cloud but there the video doesn't appear after deployment. These things are getting me crazy.
Hi Krish, don't you think having a single instance for a model is a costly operation for an enterprise, can we launch multiple models in a single EC2 instance.
Hi, you have done a great job with this playlist. However can you do a ML deployment video where a categorical variable is treated with ONE HOT ENCODING. Deployment of ML algorithm with ONE HOT ENCODING is harder compared to models where all of the inputs are numerical. There are lot's of people out there who will benefit from this including me.
Hi krish , Bhai problem ye arhy ha model up hogya ha lekin machine bht heavy ha billing bht jyda arhy hmko ney 3 ya 4 images test ki thy beginning mey billing arhy usme bht jyda agr kissi user 1000 images 1 folder mey dalkar process kiya tho bht badh jahegya billing a sakty cost kese reduce Kare
wow. i will never be able to figure this one out on my own. is it just me who has a hard time figuring out AWS deployment? how do you figure it out so easily?
Hello Sir, thanks for the video, I learned a lot from this video. And I have a question on deploying multiple models in single server. Can we add 2 ML models in 1 server? Like configuring 2 endpoints in app.py file. Example: For 1st model- 100.0.0.0:4000/predict_model1 For 2nd model- 100.0.0.0:4000/predict_model2 Here, predict_model1 predicts value using ML model 1 and predict_model2 predicts value using ML model 2. Will this create any problem in production environment? Because we are using only 1 single server instead of spinning up new server for each new model.
Great video, I am new to AWS but already an expert now with this video. For user in the Winscp, give appropriate default user name based the machine you select
Amazon Linux: ec2-user
Ubuntu: ubuntu
Debian : admin
thank you so much
Thank you so much for posting this playlist. I am looking to switch my role as data scientist and I stuck in interviews when the interviewer asks about experience in production. I just got rejection from a great company but then I came to know about your video and replicated the deployment steps for different platforms. I am beyond grateful to you for the videos as I was able to learn deployment within a few days
This video has helped me so much I just can't explain in words, thanks a lot Krish, keep up the good work
Thank you So much sir . i was trying connect to AWS EC2 since from many Days . you have explained the Security setting and it worked for me. Many Thanks .
STOP and read this.... it will help you.
Whole video is very good and educative
but there is a problem with hypercorn command(hypercorn main:app --reload) at the end.
When running it on localhost of your laptop ... its fine. But when running it on cloud you would have to explicitly give it host and post number .... otherwise you won't be able to access it using DNS or public IP of your EC2 instance
Use this command on cloud terminal >>>>> hypercorn main:app --host 0.0.0.0 --port 8000
OR(if you are using uvicorn)
Use this command >>>>> uvicorn main:app --host 0.0.0.0 --port 8000
hope it would help
This ML model deployment playlist is just too good.....there are some courses on udemy where in one course only teach you how to implement pickle objects through flask....really thanks for sharing such valuable content!! You are doing amazing work here!
thank you very much krish. The goal oriented explanation is what i liked the most in your videos i mean top to bottom approach. expecting more videos from you.
Love your channel! thank you very much for your work, such a high-energy and compact content for my needs!
This is unmatched. I recently enjoyed a similar book, and it was unmatched. "Mastering AWS: A Software Engineers Guide" by Nathan Vale
This is actually helpfull, i was struggling to understand this. Thanks a lot
Most awaited video. Thanks Krish for sharing it! :-)
Thanks Krish for the Great tutorial as always !!!! and could implement successfully in AWS
thank you bro you explained in a simple way
Also select key>>params>>versoin ppk2 to start connection to remote server. This is updated now
Thank you so much for this tutorial. Please consider creating a playlist for AWS tutorials it will be very helpful for us.
Awesome video thank you very much! I've deployed using Heroku but now know how to do it via an EC2 instance.
Very well explained; Saved a lot of time; Kudos
Very informative lecture. Keep up the good work.
Step 6: We are not exactly generating a private key(already done by AWS). Basically we are converting a .pem private key to .ppk private key so that putty (SSH client can understand). Correct me if I am wrong. Thanks for the excellent video
Simply explained, thank you
Thank you Krish, really helpful.
I tried the steps....but in the end when I try to access the aws url for the deployed model it says "This site can’t be reached"...anything I would have missed ? Even the app.py file is running fine when ran in putty.
Same happening with me. Have you found a solution for this?
@@rishabhgupta4879 Yes it worked. I was missing the port number 8080 at the end of the EC2 url
how about tensorflow serving? and docker? Kubernetes?
Hi Krish, I felt you are doing really genuine work. Thanks 🙏and keep rocking 👍
Can you tell me how to keep this server running 24*7? i.e. on closing the putty console it shuts down. How to make it run persistently so that it can be accessed from anywhere anytime?
Hi bro. I have same doubt as well. Did you figure how to do it ??
Hey bro, i got the same doubt. Can u help me out?
Did you get the solution?
I haven't found a solution yet.
Solution - search on google using "closing the putty console shuts down the site" and refer to the digitalocean website in the search result for the solution. You need to use the screen command in putty cmd. I hope this helps!
Thank you, Krish. This was very useful. 😊
Thanks a lot krish sir. Really thanks a lot
Thanks Krish sir..
thanks it was very helpful
Hi Krish, plz make a video on, how to train the deploy model with new data...
Great video krish :)
Thanks a millions lots KRISH...
You're the best. Thanks
Very nice video explained very well. How to Reduce Cost on AWS Cloud?
Brilliant. You made my day. Thanks a lot
Thanks Krish
Thanks!!!! Can i plot dynamic plots using plotly and show it on the hosted instance while prediction?
Hello sir,
What we have to use instead of putty in mac ?
Can we use the Web url which we got at the last .. In my own website under an anker tag() .!? Plz.. Ans..
Thanks a lot my AI Guru
Great stuff Krish. You might wanna re-do aws part as its changed completely.
Hi Krish,
When you gonna start ML course. I'm been waiting for your course.
Very nice explanation krish. I have some doubts
1. How we can deploy multiple flask applications into one EC2 ubuntu instance? I want to deploy multiple flask applications into one EC2.
2. Is it possible to add multiple domains into single instance? for each flask application I want to add different domain
Please let me know too
We can directly SSH into our instance if we have Windows 10 just using the command prompt.
No need to download putty or WinSCP
Great content
Hi can you tell me the exact 'scikit-learn' version you have used when you were creating the model.
hey krish, One suggestion. it would be really helpful if you would mention the limits of the free service of the cloud servers. like in Heroku, if the size of the deployment file is above 300mb then it will slow down the process, etc.
You are doing a great job and your videos helped me gain a lot of knowledge.
ty for everything. how did you get windows and ubuntu both run simultaneously?
Is putty and putty gen require for windows?
sir my application does not have pickle file as model but .py file for run time prediction
will the same procedure work???
How do you keep the server running after you close putty and everything else, so that the DNS linked opens and works?
Thank you very Much Krish (:
Does flask have cold start problem ?
How to link php framework with python to make different kind of machine learning website?
For the same code I am getting this error "No module named 'sklearn.linear_model.base' ". Can anyone help me solving this
same error
Thank you so much Krish Bhai for this! I have some queries, what are the benefits of using ec2 rather than Heroku? Heroku seemed easier to deploy and what is the free storage for both of them?
Wonderful.
Can I deploy a Django website using the same procedure and softwares?
use python3-pip in that pip update command sudp apt one. This is updated one
great video!
How to link two python files of same code??,but separation is done of a huge code. How to combine them sir.??
If you are getting any error while deploying just check your requirements(versions) file and change your port from "8080" to "8008".
Thank You ❤️
This is great. Thank you
this process is free?
Sir, please make a video where this tutorial is done on ubuntu because we generally work on the Linux environment in the real industry, and windows have this software like putty and WinSCP so how to do deployment complete from the command line in ubuntu? please make a video on that too!
Use mobaxterm
Why is the zone as us-east? Isnt it better to keep it close? Like ap-south?
I tried deploying the CNN model it is working fine on localhost also seems good on ec2 instance but I am not able to see anything on that IP ... I have taken all the steps the same as your videos.
May i know ,whats the difference between this approach and deploying with sagemaker
I am unable to connect using ec2-public ipv4. Even tried to connect using the ipv4 address .. doesnt work.curl localhost is giving correct results. I have used dockerfile to run the fastapi, can someone help me here?
Hi Sir, Can we also create a flask app, which takes input in the form of json (having only one data instance on which predictions are to be made). And if we deploy this app on EC2, will we have the cloud interact with our local system to upload that instance. Need Help Sir on this Please!
Krish, this video is fantastic. I have used Jupyter Notebook etc on AWS but have never deployed a bespoke API like this.
One thing that isn't clear, how would you be able to host multiple services in the same instance. The URL for the instance contains no content that points to a particular web service.
Is it the port number 8080 that routes to the API we have installed? So if we required another we would use a different port number perhaps? Or can the URL be qualified?
I have a doubt for the web to start and run the python3 aap.py is to be written.
but can we not host this permanently so that we can run it without writing this statement???
When i trt to deploy my own code , and when i press predict button is shows internal server error. Please anyone help me..
Is the file storage system of EC2 ephemeral like Heroku?
While deployment pipe install -r requirements.txt all the packages going to download but at the end
(Permission denied: '/usr/local/lib/python3.7') on EC2 instance
got this type of error. I tried in the various blogs but i didn't get the answer. So please help me how to solve this error
Hi Krish, thanks for the video with great content! One question: what could be the problem if my EC2 instance runs normally while my website have no response (show nothing)?
Hi Krish , great help ...
my question is how to keep my app active , if I close my ubuntu server through putty it will close the services .
!Hi @Kunal, were you able to find a solution for this? I am also looking to keep my app active but if I close my ubuntu server through putty, it is closing the services. Please let me know.
Just found the solution. Search on google using "closing the putty console shuts down the site" and refer to the digitalocean website in the search result for the solution. You need to use the screen command in putty cmd. I hope this helps!
@@pruthvipatel7368 Thank Pruthvi ! this helped immensely for my project
Hi Krish
I have 2 questions
1) DO we have to keep putty open all the time and keep running our server?
2) When we are giving user the URL of our app. Do we need to give amazon url followed by port 8080?
Hey, I had the same question. Have u figured out if others can use that url to access the demo as well?
Traceback (most recent call last):
File "app.py", line 6, in
model = pickle.load(open('model.pkl', 'rb'))
ModuleNotFoundError: No module named 'sklearn.linear_model.base'
same problem
@@rahulbsadyanth8745 please import scikit learn(latest version) in model.py ,build a new pkl file and change the version of scikit learn in requirements.txt file. It will work
Sir I'm deploying another project, In putty it is showing me no module name tensorflow, but it is already installed during requirement.txt installation. What can I do?
When you started new batch regarding data science classes... please provide me clear information
Hey Krish, great video. Just had a small doubt, can this be considered as DevOps?
I encountered an error while installing requirements.txt file in putty.
ERROR: Could not find a version that satisfies the requirement altair==4.2.0
Can anyone help me with this ?
Please use only these packages which are mentioned in the github link and it will work.
Flask==1.1.1
gunicorn==19.9.0
itsdangerous==1.1.0
Jinja2==2.10.1
MarkupSafe==1.1.1
Werkzeug==0.15.5
numpy>=1.9.2
scipy>=0.15.1
scikit-learn>=0.18
matplotlib>=1.4.3
pandas>=0.19
@@jaikishank I'm using streamlit. And now streamlit-webrtc is causing error. The error says unable to find wheel for 'some dependencies'.
I felt irritated and tried deploying on streamlit cloud but there the video doesn't appear after deployment. These things are getting me crazy.
@@subhamchoudhary4091 .Ok I understand. I had similar problem when used with streamlit to deploy in Heroku and then dropped.
What is the main difference between AWS EC2 instance and Heroku Cloud Deployment ?
as we using putty to connect to linux terminal . as our connection lost our application also goes down. any workaround to this to make app running.
hi, can you help me Krish ,somone ask me :: how do you know the cost function go to the global minimum,
Hi Krish, don't you think having a single instance for a model is a costly operation for an enterprise, can we launch multiple models in a single EC2 instance.
Thank you sir
Thank you
Hi, you have done a great job with this playlist. However can you do a
ML deployment video where a categorical variable is treated with ONE
HOT ENCODING. Deployment of ML algorithm with ONE HOT ENCODING is harder
compared to models where all of the inputs are numerical. There are
lot's of people out there who will benefit from this including me.
Please can you make video on Deploy of Ansys Model in AWS EC2 .
Any tutorial on using Python flask on Docker running on Ubuntu ?
Hi krish , Bhai problem ye arhy ha model up hogya ha lekin machine bht heavy ha billing bht jyda arhy hmko ney 3 ya 4 images test ki thy beginning mey billing arhy usme bht jyda agr kissi user 1000 images 1 folder mey dalkar process kiya tho bht badh jahegya billing a sakty cost kese reduce Kare
wow. i will never be able to figure this one out on my own. is it just me who has a hard time figuring out AWS deployment? how do you figure it out so easily?
How to serve python code in Apache server ?
SIR plz make a video on IBM cloud.
Very quick
What if I have a Linux environment, what's the alternative to Putty?
Hi krish, can u make a video on how to deployed same model on production based env.
Hi krish i have a small question, the pip install is a one time thing right?? It needs not to be repeated for every instance. Amazing video as usual 😀
Hello Sir, thanks for the video, I learned a lot from this video.
And I have a question on deploying multiple models in single server. Can we add 2 ML models in 1 server?
Like configuring 2 endpoints in app.py file.
Example:
For 1st model- 100.0.0.0:4000/predict_model1
For 2nd model- 100.0.0.0:4000/predict_model2
Here, predict_model1 predicts value using ML model 1 and predict_model2 predicts value using ML model 2. Will this create any problem in production environment? Because we are using only 1 single server instead of spinning up new server for each new model.