Wish you all Happy New Year Guys!!! May this New Year add more feathers to our hat.
Model deployment is one of the very crucial task of the whole process. Deployment of trained model is very important because it makes the process easier for the end user and add value to the organization. In this series of model deployment, we are going to learn the following steps in upcoming articles:
- Repository Directory — Arrangement of the files in the repository.
- Git installation and RSA setup.
- Introduction of Github as well as creating and maintaining repositories in Github (Push, Pull, clone, branch and other important commands) as well as Source tree.
- Deployment of the model to Heroku app.
- Deployment of the model to Streamlit app.
- Deployment of the model using Docker.
- Overview of the Pycaret library.
Without any delay, let start our journey to Deploy ML/DL model.
- Repository Directory — Arrangement of the files and folders in the repository.
This is the basic section if you don’t want you can skip this section.While creating or initiating any project, it is very importing to arrange the files and folder of the project in a detailed way so any person who visit the repository can understand the content of the folder as well as file contents and he or she can carry it forward. In this Section of this article we are going to discuss this is detailed way.
There is some kind of unstated rules which is followed in each and every step of the repository they are:
- Log.txt: This file is same as the log of any application, we use it contains the each and every activity which is performed on the repository. It can be updated automatically or manually. It keeps the track of the activity performed by the different teams on the repository.
- The structure of the Repository: It is very important to have segregated folder structure with multiple branch dedicated to development, testing, integration and bug. The below diagram defines the folder structure of the repository.
2. Git Introduction and set-up
Git is a version control system which automatically tracks and keeps records of the changes which have been performed on the repository (local or remote) over the time. Below image summarizes the workflow of the git with local repository and remote repository.
Installation: For installation of git you can visit the link.
- Configuration of Git: Before we take any step further we have to configure the username and as well as the email globally. For authentication we can set up ssh authentication the help of the RSA algorithm in which we have to upload the public key in the Github SSH and GSA section, so we do not need to write our email and password when we pull or push into the repository.
Setting- up email:
Command: git config — global user.email “enter your email”
Setting- up username:
Command: git config — global user.name “enter your user name”
Note: Create a github account prior to this section, use email and username associated with the github account.
Setting- up RSA SSH authentication:
Command: ssh-keygen -t ed25519 -C “enter your email”
This above command will generate the RSA public and private key and you have to upload the public key in the SSH section of the Github inside settings page.
Checking SSH key:
Command: eval “$(ssh-agent -s)”
This above command will give the Agent pid which means it is functioning in local machine perfectly. Now we have to add SSH private key to the SSH agent using below command.
Command: ssh-add ~/ .ssh/id_ed25519
Note: If you have generated a key with different id please replace the “id_ed25519” with the id you have generated the private key.
Copying Key and Pasting it into Github SSH public key section:
Installing xclip to copy the content of the public key file
Command: sudo apt-get install xclip
Copy the content of the file to clipboard
Command: xclip -selection clipboard < ~/.ssh/id_ed25519.pub
Note: If you have generated a key with the different id please replace the “id_ed25519” with the id you have generated the public key.
The below image will describe the whole process :
As we say “Car is useless if it doesn’t have a good engine” similarly student is useless without proper guidance and motivation. I will like to thank my Guru as well as my Idol “Dr. P. Supraja”- guided me throughout the journey, from the bottom of my heart. As a Guru, she has lighted the best available path for me, motivated me whenever I encountered failure or roadblock- without her support and motivation this was an impossible task for me.
Extract installed packages and version : Article Link.
Installation of Git: Link,
Git Documentation: Link
Github Documentation: Link
Notebook Link Extract installed packages and version : Notebook Link
YouTube : Link
If you have any query feel free to contact me on any of the below-mentioned options:
Google Form: https://forms.gle/mhDYQKQJKtAKP78V7