 Well, hello everybody and welcome to another Tech and Talk, Diane Mueller and the Director of Community Development for Red Hat OpenShift. And as such, you can just imagine how excited I was last week at Grace Hopper, not just because there were 18,000 women in tech hanging out, but because we hosted an open source day hackathon and in walked Gokila Dorai from Florida State University with a question about how do we make TensorFlow work on OpenShift? And as it happens sometimes at conferences and hackathons, wonderful things happen. And in about four and a half hours of hacking on it, we got TensorFlow up and running on OpenShift and Eleanor and Ryan from the Red Hat Consulting Team were key peak folks who helped make that happen. And so we figured we'd share how we did that and what TensorFlow is this week right away as there's lots of interest in machine learning and AI and running those payloads on OpenShift and kick off the conversation about that. And that will, first we're going to start off, Gokila is going to give a little background on what TensorFlow is for those of you who don't know yet. And then we're actually going to do a demo and see running some linear regression perhaps on OpenShift with TensorFlow. So the tech and talks are always about new innovations, new technologies. This is sort of bleeding edge. So I'm going to let Gokila kick it off and we'll have live Q&A at the end. You can ask questions in the chat. And if we can, we'll answer them. So go for it, Gokila. Thank you, Diane. Hello, everyone. Hello, everyone. If you want to learn how to use deep learning in your applications and deploy them on a platform, then welcome to this podcast. So I'm Gokila Durai. I'm a PhD student from a Florida State University and I specialize in mobile forensics and I use machine learning for my applications. It was a great pleasure working with Eleanor and Ryan at the Grace Harper's conference during the open source day at that codathon event. So let's get started. So what's Google's TensorFlow? It's one of the most popular tools for deep learning. With TensorFlow, you can build your own machine learning systems and use them to power your own applications. And today we will learn how to use TensorFlow to build and deploy machine learning models. So what is TensorFlow? It is one of the most popular deep learning frameworks that's available. It's used for everything from cutting edge machine learning research to building new features for the hottest startups in Silicon Valley. If you're new to machine learning, then you may be wondering what TensorFlow actually is. TensorFlow is a software framework for building and deploying machine learning models. So machine learning is a different approach than traditional programming. With traditional programming, we write the program that tells the computer exactly what to do. So the task to be done. So what's machine learning? With machine learning, we don't explicitly tell the computer how to do something. Instead, we show a training data and the machine learning algorithm uses the training data that comes up with its own rules to complete the task. So deep neural networks built with TensorFlow are used in many different areas. For example, image recognition, speech recognition, image style transfer, and language translation. So where you recognize objects appear in a picture called image recognition. Where speech turns into text is speech recognition. And image style transfer is where you can make a photograph look like how it was painted by a most popular artist. And language translation is where you translate from one human language to another. So these are typical machine learning applications. So why do we prefer TensorFlow? And developed at Google, TensorFlow was designed to be a common platform for building machine learning applications internally. In late 2015, Google decided to share it with the world and release it as an open source application. So TensorFlow is licensed under Apache open source software license. That means you can use it, modify it, and even redistribute the modified version to others. You don't have to pay anything for licensing fee to use TensorFlow. And it gives you the basic building blocks that you need to design, train, and deploy machine learning models. While it's flexible enough to be used for several different types of machine learning types of algorithms, it's typically used for building deep neural networks. So let's see a few things about how data is incorporated in TensorFlow. So the name TensorFlow comes from the design of the system. So TensorFlow is designed to work with very large datasets made up of many different individual attributes. Any data that you want to process with TensorFlow has to be stored in a multidimensional array. These multidimensional arrays are also called tensors, and there comes the name TensorFlow. To run operations on the dataset, you construct a computational graph, which is similar to a flow chart that determines how data flows from one operation to the next. So for example, the input math matrices are given here, 3, 3, 1, 2, 2, 4, 2, 1, 3, 3, and 2, 4. So you can add and then you can square the output, and hence you get the output. So these are examples of computations that's being conducted in TensorFlow. So imagine this is being conducted on a very, very large datasets, huge matrices. And here comes OpenCheck. So first we will cover how to get TensorFlow installed and running on our system. Then we will explore how to create and train a machine learning model in TensorFlow. We will be using OpenShift, which is an open source container application platform, which is built by Red Hat. Next we will use TensorFlow's visualization tools to analyze and improve our machine learning model. That is once we have the output from a matrix calculation or computation, we are going to represent it physically as a graph. Finally, we will deploy the model to the cloud where we will call it from any program. So let's get started. Elenor. Sure. Hi, thank you. So Ryan is going to go over a little bit of like the overview of really OpenShift and kind of how it works on a high level. And then I can show you what it looks like to get a basic TensorFlow container image up on OpenShift. Many of our consulting teams have been leveraging OpenShift to deliver solutions for our customers across a wide range of industries. And it's always interesting to be able to go on site and work with our partners and see how they're leveraging OpenShift. It was nice to be a grace hopper and see a brand new use case, which was TensorFlow. Getting TensorFlow running on OpenShift was really great for Red Hat consulting. It's definitely something that we as an organization have been interested in doing. So really our choice for our container platform is OpenShift. We were using OpenShift Origin, the web string version of the Red Hat OpenShift container platform. And really OpenShift allows development teams to quickly deploy code in a very scalable environment. And it's also backed by Kubernetes as well for orchestration. So it's a great fit for IT operations as well. So I think having TensorFlow as part of the OpenShift ecosystem is great. And I'm excited to see how this gets deployed. Cool. So let me share my screen, and I can show you a little bit of how we got started. Okay. So originally what we were doing was searching to see, here it is. If TensorFlow has already been containerized, so if there's an existing TensorFlow image that's up on Docker Hub, and there actually is, and they've set it up to use Jupyter Notebook that's really a couple of sort of Hello World or Quick Start applications that include all of the dependencies that you need to create these graphs. So you have TensorFlow and all the installs for that, as well as Matplotlib, NumPy and the various other like Python data visualization tools. So up on Docker Hub, you can see that the image is already there. And if you're curious about putting anything else on OpenShift, this is a great place to start. So they do have an existing image. We played around a little bit with it and explored the GitHub repo to see what kind of stuff they have available. We're just going to deploy the introductory sort of Dockerfile, the general one that they have, but they also have tools for, if you're trying to use like GPU support or things like that, they've created a couple other Dockerfiles as well. So if we were to scale this up in OpenShift to something much bigger like one container, which is what we'll be deploying right now, you can use a variety of these images here. So what I've done is just, I've basically spun up a local instance of OpenShift for me because that was the easiest way to do it. You can also run OpenShift on your own, if you can have your own server or your own virtual machines. You can also run it on Google Cloud Platform or AWS or Azure or other systems like that. And I can send out those links afterwards if you guys are curious. So I have this, basically this local instance of OpenShift origin. I already actually have created the TensorFlow objects in here, but I'm going to go ahead and delete them. This is just to make sure that everything is working. So let me, I have this new project. So now on OpenShift, I have a project, which is basically where I can contain all of my various objects for deploying this. So I'm going to have an image stream, which basically contains all of the image data for your actual container. So this is just going to be the TensorFlow image. And then I'm going to have a deployment config, which defines how to actually deploy it as a container in OpenShift, as well as a route, which lets the container be externally exposed. So we can actually hit it and see the Jupyter notebook page as it comes up. So what's nice about having it already up on Docker Hub is that I don't even have to create my own repo and like define the whole TensorFlow image and everything myself in a Docker file. I can actually just create it automatically like this, but this OC new app, TensorFlow and TensorFlow latest line, this pulls the image directly from Docker Hub. But if you were to, if you wanted to create your own, what you would do is you would have your own repo that has a Docker file that calls from TensorFlow colon latest, and that would basically be how you would build off this existing image. So the reason this is crashing is because I have to actually give it the ability to run as root because that's currently the way that set up the container. So I'm just going to create this route. What I'm doing here is creating a service account that lets the container actually run its route. So what I'm going to do is basically edit the deployment config for this TensorFlow image and I'm going to give it the ability to run as root. So now if we go into our deployments and look at the TensorFlow one, as it redeploys since I made this change, we'll actually see that it comes up and running. And it shows copy pastes URL to your browser. What we want to do is actually expose this route so that we can hit it since we can't actually do it at local host since it's on OpenShift. So what I'm going to do is expose this service, which will create a route at this port. But in the log for the file, you can see that it's at 8888 instead of 6006. So I'm going to edit this so that it hits the right port. So now if we go to our overview, we can see all of the objects that are contained within this whole TensorFlow application. And if I hit this URL, it sends me to basically what they've set up the Jupyter Notebook that includes all of the TensorFlow dependencies. So in the pod itself, it gave me this token so that I could log in. I'm just going to copy that and then log in. And what they give you by default with this image is super helpful. It's basically just a series of steps of how to get started with TensorFlow and how it really works, which is great for someone like me as a total beginner with it. And they let you in Jupyter Notebook basically have live code so you can add anything you like and include all of the Python dependencies and TensorFlow here is already imported. I'm going to look at this guy, which has some pre-existing graphs in it as well. So here, basically, if I make any changes here, maybe if I change this to like 100 and then run it and see what happens as it gets recreated the graph with additional points. And this is great because you can actually just make all of these changes yourself and see the graphs change as it happens. And the container already includes all of the resources that you need. Let's see. I think they have some additional ones here. And there are tons of resources on GitHub that use this image that include other ways to show graphs or other additional algorithms that people have worked with. I know, Kokila, you've worked with a variety of algorithms to create that linear regression plot that you were talking about. And all of these can be created within this container here. And the benefit of OpenShift in this space is that you could scale it up to really any size. So instead of just having one container, which would be similar to just running TensorFlow on your own local machine, you could scale it up to a much larger size and handle a lot more data or put it on the cloud somewhere where you have OpenShift installed. So I have a quick question for you guys. Two things. And then people who are listening and have questions, please type them into the chat and we'll try and answer them as well. You mentioned that you needed root access to do this. Is that going to be ongoing? You'll always need root access in order to do this? Or is that something that we could tweak a specific OpenShift TensorFlow image so that you didn't need root access? Because I know that's always a question mark in every ops person's mind. That's a great question. Yeah, you actually can. Any Docker file that we create off of that base image, we can set it to have a specific user ID so that instead of root, which is just the default from the Docker Hub image, it can just pull from, I don't know, it can be user 1001 or one of the normal ones that people use. Because yeah, you're right. It's not great to run a container with privilege. It was a hackathon. We had to do what we had to do. Exactly. And the other question was about scaling up. The image that you're using, you mentioned at the beginning, wasn't a scalable one, I think. I wasn't quite sure whether I interpreted that correctly. The one from Docker. Is there anything we have to do specifically to add more resources or additional nodes for of this Jupyter notebook? Because I'm wondering the Jupyter dependency, which I love Jupyter and we'll have the Jupyter folks on and do more and you're going to make Graham Dumpleton incredibly happy by showcasing it. One of our colleagues at Red Hat who loves the Jupyter notebook project. But I'm wondering about that. Is there something, a next step that we need to do for these images to make them really, truly scalable and sort of a more production or research way? I think probably, I don't remember exactly what I said, but it was probably with regards to me having my own local instance of OpenShift and so it's basically limited by the resources on my laptop right now. So depending on what cluster you have set up or what system you're using, if you're running this on something like Google Cloud Platform you could have, you could scale it up to really any size based on, you know, your needs. And your credit card. Yeah. Your credit card dependencies. But it's also we should be able to run this same image then on OpenShift Online or OpenShift Dedicated to and create a nice big chat cluster of Jupyter notebooks and TensorFlow running. So that, I think that might be the next thing to test out and try and get Gokila to do some real cool stuff because the work, you were sitting there at the Hackathon and Grace Hopper and just noodling away and saying, oh, I'm just a PhD just a PhD candidate at FSU. And then when I looked at LinkedIn after we got back, you're doing this really cool stuff around mobile forensics. Oh, thank you so much. A little bit about how are you going to use or what kind of use of TensorFlow you're going to use in that field. Mm-hmm. So we are performing live data analysis for forensics and this is like a novel approach and first of the kind because there are plenty of commercial tools that's available for law enforcement and every time a new license is being released or a new version of the commercial tool is released, law enforcement tends to pay several thousand dollars to get their license up in renewal and the pace at which mobile phones are getting updated. The operating system gets updated once every year. So law enforcement has to catch up with their investigative methods and methodologies and tools up to the operating system. And we were trying to work around the solutions and try to see what's the fastest way to extract evidence off of mobile devices and looking at the fastest ways of course, if we have humans look at the evidence and tell what's contained in the evidence, then probably that's going to be a time-consuming work and that is where artificial intelligence comes into picture and that's where we are exactly using our machine learning models. So we will have our first publication out by the end of the year and we'll be more than happy to share it with all of you. Yes, let's keep looking forward to the publication that comes out. That would be great and we'd definitely have to keep in touch and connected on this and maybe even get an account on OpenShift Online and try it deploying some of the stuff there. That would be wonderful and I don't have to worry about scalability. Yes, we'll see what we can do to make that happen. And Ryan's asked a couple of questions of the folks who are in the chat and online and there are a really good number of people who are listening into this live at the moment. And I'm curious of the other folks who are out there and would love to get your feedback on how you're planning on using TensorFlow on OpenShift or what your interests are in TensorFlow. We're going to try and kick off an OpenShift Commons SIG on machine learning which we will have Paquilla and Eleanor and Ryan and a few dozen other people I'm sure. So look for that or email me and I'll sign you up for this. The special interest group is what SIG stands for. But if there's anybody who's in the participants list now would be a great time to tell us what you're doing. And Subin has just mentioned, yes, there is a CentOS 7 image for that. So that would be another and the whole analytics group is doing a lot of stuff within Red Hat as well. So Subin, can I unmute you and you can tell us a little bit about that? Let me see if I can unmute. Can you hear me? Yes, yes I can. Hi, I'm Subin from the... Oops, we lost him. Sorry, I muted myself. So hi, my name is Subin I've been working on TensorFlow from past few weeks and this is really exciting to see this particular demo. So we looked at the 7 image and we found that that was Ubuntu based and minor issues which even you are facing. So we put some effort and tried to create a CentOS 7 image for that. So I just pasted a link on that. And of course you can definitely see some of our works what we are working on in Red Hat Analytics HIO. One example which we have up for TensorFlow is this particular example for MNIST which we have developed with S2i which is another feature from OpenShift. Definitely I mean if you could look at it give us your feedbacks and whatever learnings you have done that would be great for us because we are just a couple of weeks old in this. Well if you want to come on another upcoming OpenShift Commons briefing and demo it and show it off. I would love to have you guys on from the Rata Analytics Group they always do great demos and wonderful things so that would be a great way to do it and I understand using CentOS is probably a much more closer to what we are using with RHEL and things like that so it is probably a better landing place for our customers at Red Hat always open to all of them. Is there anyone else out there in the participants list there who has any experience with TensorFlow because it is pretty new to everybody I think and we definitely got a lot of folks at Google very interested in working with OpenShift so I will be having them on sometime in two soon, pretty soon and oh and Douglas is saying that there is an OpenShift blog on how to use GPUs in OpenShift 3.6, yep that is still alpha yes we definitely know that is still alpha but we are definitely looking for getting that up in one. So I think there is a lot of interest in TensorFlow machine learning and that throughout all of Red Hat and in the OpenShift Commons Groups and in Kubernetes world so we will definitely start maybe a monthly cadence of talks around machine learning and we will keep up with go killer and the work she is doing in mobile forensics because that is CSI and totally cool and we would love that the CSI TV shows was actually reality and maybe using OpenSource to make that happen is the way to do it because most of the local law enforcement groups that I work with across Canada and North America they don't have the funding for those kind of labs that we see in TV though everybody expects that DNA to happen so it will be really interesting to keep up with you and so I really am so psyched it was great technology to get a demo of it was a wonderful outcome for the hackathon that the OpenShift consulting team that Red Hat staffed that thing and it was just wonderful to see all those women in tech working together and Ryan stepping up as an ally and working on getting these problems solved and getting the image up and running it was pretty impressive so thank you all for all your work and we will talk to you again soon we will let Eleanor and Ryan go back to their conference now that we have stolen their lunch hour we don't have to eat whatever nibbles people left but we will definitely get all of this up and running again and talk to you all soon and if you would like to be in the special interest group on machine learning drop me an email at d-m-u-e-l-l-e-r at redhat.com thanks all thank you thank you