Create your deep learning server in 30 minutes

Start by installing anaconda, and finally create different environments for Python and tensorflow so that they don’t interfere with each other. And in the middle of it, you will inevitably screw up and start from scratch. This happens many times. < / P > < p > this is not only a huge waste of time, it is also irritating. With all the stack overflow threads, we often wonder what’s wrong. < / P > < p > in this blog, I will try to build a deep learning server on EC2 with minimal effort so that I can focus on more important things. < / P > < p > set up an Amazon EC2 machine with a pre installed deep learning library. Use TMUX and SSH tunnel to set up jupyter notebook. Don’t worry, it’s not as hard as it sounds. Just follow the steps and click next. < / P > < p > I assume you have an AWS account and have access to the AWS console. If not, you may need to sign up for an Amazon AWS account. < / P > < p > Amazon has pre installed deep learning software for community AMI. To access these Amis, you need to look at the community AMI and search for “Ubuntu deep learning” in the Search tab. You can choose any other Linux style, but I find that Ubuntu is the most useful for my deep learning needs. In the current settings, I will use deep learning AMI version 27.0 < / P > < p > to select the “instance type” after selecting AMI. Here, you can specify the amount of CPU, memory and GPU required in the system. Amazon offers many options based on individual needs. You can use the filter by filter to filter GPU instances. In this tutorial, I used the p2.xlarge instance, which provides 2496 parallel processing cores and 12gib of GPU memory for NVIDIA K80 GPU. To understand the different instance types, you can view the documents in the links below and see the prices. View document: view price: < / P > < p > you can change the storage connected to the machine in step 4. If you don’t add storage in advance, you can, because you can do it later. I changed storage from 90 GB to 500 GB because most of the deep learning requirements require the right storage. < / P > < p > that’s all. You can start the instance after entering the final review instance settings screen. When you click start, you will see this screen. Just enter any key name in key pair name and click download key pair. Your key will be downloaded to the computer under the name you provided. For me, it’s saved as “AWS.”_ key.pem ”。 When finished, you can click “launch instances” to start the instance. < / P > < p > now, you can click “view instances” on the next page to see your instances. This is what your instance looks like: < / P > < p > to connect to your instance, just open a terminal window on your local computer, and then browse to the folder where the key pair file is saved and some permissions are modified. chmod 400 aws_ key.pem Once this is done, you will be able to connect to your instance via SSH. The format of the SSH command is: < / P > < p > you have the machine ready and ready. This machine contains different environments with various libraries that you may need. This particular machine has mxnet, tensorflow and python, as well as different versions of Python. The best thing is that we’ve pre installed all of these features, so it’s out of the box. < / P > < p > however, there are still things that need to be used to make the most of your computer. One of them is jupyter notebook. To set up Jupiter notebook on your computer, I recommend using TMUX and tunneling. Let’s set up the Jupiter notebook step by step. < / P > < p > using TMUX to run Jupiter notebook, we will first use TMUX to run Jupiter notebook on an instance. We mainly use it so that our laptop can still run even if the terminal connection is lost. To do this, you will need to create a new TMUX session using the following command: < / P > < p > it would be beneficial to copy the login URL so that we will be able to get the token when we try to log in to the Jupiter notebook later. As far as I’m concerned, it’s: < / P > < p > the next step is to detach the TMUX session so that it continues to run in the background, even if you leave the SSH shell. To do this, simply press Ctrl + B, then D, and you will return to the initial screen with the message that you have detached from the TMUX session. < / P > < p > TMUX attach – t streamsessionssh tunnel to access notebooks on the local browser. The second step is to enter the Amazon instance to get the jupyter notebook on the local browser. As we can see, the Jupiter notebook actually runs on the local host of the cloud instance. How do we access it? We use SSH tunnels. Don’t worry, it’s easy. Just use the following command from the local machine terminal window: < / P > < p > now you can select a new project by selecting any different environment you want. You can come from tensorflow or pythorch, or you can have both. Notebook won’t let you down. < / P > < p > after you restart your computer, you may encounter some problems with your NVIDIA graphics card. Specifically, as far as I’m concerned, the NVIDIA SMI command stops working. If you encounter this problem, the solution is to download the graphics driver from the NVIDIA website. < / P > < p > simply copy the download link by right clicking and copying the link address. And run the following command on the computer. You may need to change the link address and file name in it. < / P > < p > that’s it. You have mastered and started the deep learning machine, and you can use it freely. Remember that whenever you stop working, you should stop the instance, so you don’t have to pay Amazon when you don’t work on the instance. You can do this by right clicking your instance on the instance page. Note that when you need to log on to the computer again, you may need to retrieve the public DNS address from the instance page because it may have changed. < / P > < p > in this blog, we set up a new deep learning server on EC2 in the shortest time by using the tunneling technology of AMI, TMUX and Jupiter notebook. The server is pre installed with all the deep learning libraries you may need in your work and is ready to use out of the box. Continue ReadingStraight screen S20! Samsung Galaxy S20 Fe exposure: 1Hz high brush + snapdragon 865