<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Tata Vishnu Vardhan Rao on Medium]]></title>
        <description><![CDATA[Stories by Tata Vishnu Vardhan Rao on Medium]]></description>
        <link>https://medium.com/@tatavishnurao?source=rss-7b2fdd44d3b5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*sCzF8jJ0a20YNivGsaRnDQ.png</url>
            <title>Stories by Tata Vishnu Vardhan Rao on Medium</title>
            <link>https://medium.com/@tatavishnurao?source=rss-7b2fdd44d3b5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 10:39:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tatavishnurao/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Setup your Deep Learning Environment in Ubuntu 24.04.1 LTS]]></title>
            <link>https://medium.com/@tatavishnurao/setup-your-deep-learning-environment-in-ubuntu-24-04-1-lts-11c036ea6bb4?source=rss-7b2fdd44d3b5------2</link>
            <guid isPermaLink="false">https://medium.com/p/11c036ea6bb4</guid>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[setup]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[pytorch]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Tata Vishnu Vardhan Rao]]></dc:creator>
            <pubDate>Wed, 05 Feb 2025 02:10:52 GMT</pubDate>
            <atom:updated>2025-03-04T02:37:17.349Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ex2ZtQcQyklbxbAC_ovSlA.jpeg" /></figure><p>If you are someone who is unable/confused to setup their Nvidia GPU for CUDA accelerated training , you have chosen the right article.</p><p>Previously, I used to run all my model training on Windows 10 but Tensorflow stopped supporting for 11 when I switched from my Windows 10 PC. So you can either run Tensorflow on Cuda with the help of WSL2 in Windows 11 or you can just switch to Linux-based Distro like Ubuntu, Arch linux, Fedora and many.</p><p><strong>SO, LETS GET STARTED!</strong></p><p><strong>1. CHECK NVIDIA DRIVERS IN THE TERMINAL</strong></p><pre>#Ctrl+Alt+T to open your terminal<br>$ nvidia-smi  <br>+-----------------------------------------------------------------------------------------+<br>| NVIDIA-SMI 550.120                Driver Version: 550.120        CUDA Version: 12.4     |<br>|-----------------------------------------+------------------------+----------------------+<br>| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |<br>| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |<br>|                                         |                        |               MIG M. |<br>|=========================================+========================+======================|<br>|   0  NVIDIA GeForce RTX 4060 ...    Off |   00000000:01:00.0  On |                  N/A |<br>| N/A   45C    P4             10W /   55W |     537MiB /   8188MiB |      0%      Default |<br>|                                         |                        |                  N/A |<br>+-----------------------------------------+------------------------+----------------------+<br>   </pre><p>If you get something like this, it means that your Nvidia drivers are installed and recognized by the OS. If you get an error, just run the below command to install them:</p><pre>$ sudo ubuntu-drivers autoinstall<br><br>#or <br>$ sudo add-apt-repository ppa:graphics-drivers/ppa</pre><p>For the changes to take place just type “exit” in terminal or use the following command,</p><pre>$ sudo reboot</pre><p><strong>2. CREATE YOUR UPDATE.SH</strong></p><p><em>MUST TIP FOR UBUNTU USERS: </em>Setup your update.sh instead of manually typing<em> “</em>sudo apt upgrade &amp;&amp; sudo apt update” every single time or using the arrow keys to navigate to previous commands every time. Now to setup update.sh,</p><pre>$ nano ~/update.sh<br><br>#!/usr/bin/env bash<br><br>if [ &quot;$EUID&quot; -ne 0 ]<br>  then echo &quot;Error: Please run as root.&quot;<br>  exit<br>fi<br><br>clear<br><br>echo &quot;################################################################################&quot;<br>echo &quot;Updating list of available packages...&quot;<br>echo &quot;--------------------------------------------------------------------------------&quot;<br>apt update<br>echo &quot;################################################################################&quot;<br>echo<br><br>echo &quot;################################################################################&quot;<br>echo &quot;Upgrading the system by removing/installing/upgrading packages...&quot;<br>echo &quot;--------------------------------------------------------------------------------&quot;<br>apt full-upgrade --yes<br>echo &quot;################################################################################&quot;<br>echo<br><br>echo &quot;################################################################################&quot;<br>echo &quot;Removing automatically all unused packages...&quot;<br>echo &quot;--------------------------------------------------------------------------------&quot;<br>apt autoremove --yes<br>echo &quot;################################################################################&quot;<br>echo<br><br>echo &quot;################################################################################&quot;<br>echo &quot;Clearing out the local repository of retrieved package files...&quot;<br>echo &quot;--------------------------------------------------------------------------------&quot;<br>apt autoclean --yes<br>echo &quot;################################################################################&quot;<br>echo</pre><p>Click Ctrl+X to save the changes and choose your suitable name for this .sh file. If it is not executable, then type</p><pre>$ ls<br><br>#check whether the file is present in the current directory<br><br>$ sudo chmod +x update.sh</pre><p>Run the file to check whether everything is working,</p><pre>$ sudo ~/update.sh<br><br>################################################################################<br>Updating list of available packages...<br>--------------------------------------------------------------------------------<br>Hit:1 https://download.docker.com/linux/ubuntu noble InRelease<br>Hit:2 https://brave-browser-apt-release.s3.brave.com stable InRelease                                                <br>Hit:3 https://dl.google.com/linux/chrome/deb stable InRelease                                                        <br>Hit:4 http://in.archive.ubuntu.com/ubuntu noble InRelease                                                            <br>Hit:5 http://security.ubuntu.com/ubuntu noble-security InRelease                                                     <br>Hit:6 http://repo.steampowered.com/steam stable InRelease                                                            <br>Get:7 http://in.archive.ubuntu.com/ubuntu noble-updates InRelease [126 kB]                      <br>Hit:8 https://ppa.launchpadcontent.net/ubuntu-toolchain-r/test/ubuntu noble InRelease                <br>Hit:9 http://in.archive.ubuntu.com/ubuntu noble-backports InRelease ............</pre><p>You should be able to see something like this. Now that you are done with troublesome terminal stuff and automated your update task in your distro.</p><p><strong>3. Miniconda3 and Browser Setup</strong></p><p>Lets move on with the browser and Miniconda3 setup.</p><p>Download Google Chrome and then move on to install Brave anyhow.(hehe)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*6QIiqlkZGDaXN1WWqJyFug.jpeg" /></figure><p>To directly install brave,</p><pre>$ curl -fsS https://dl.brave.com/install.sh | sh<br><br>#if curl not recognisable, just type &quot;sudo apt install curl&quot;<br><br>#download the debian package of any browser<br><br>$ sudo dpkg -i saved_file_browser.deb(go to downloads and copy the file name of the .deb file<br>#or<br>$ sudo apt install ./google-chrome-stable_current_amd64.deb</pre><p>For Miniconda3 setup,</p><pre>$ curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh</pre><p>Once the script is downloaded, run the below command:</p><pre>$ ./Miniconda3-latest-Linux-x86_64.sh</pre><p>Configure your environment variables to check whether conda is recognized in your Terminal,</p><pre>$ nano ~/.bashrc<br>conda config --set auto_activate_base false<br><br># TO SAVE CHANGES<br>$ source ~/.bashrc</pre><p>You should be able to get something like this,</p><pre>(base) $ conda<br>usage: conda [-h] [-v] [--no-plugins] [-V] COMMAND ...<br><br>conda is a tool for managing and deploying applications, environments and packages.<br><br>options:<br>  -h, --help            Show this help message and exit.<br>  -v, --verbose         Can be used multiple times. Once for detailed output, twice for INFO logging, thrice for<br>                        DEBUG logging, four times for TRACE logging.<br>  --no-plugins          Disable all plugins that are not built into conda.<br>  -V, --version         Show the conda version number and exit.<br><br>commands:<br>  The following built-in and plugins subcommands are available.<br><br>  COMMAND<br>    activate            Activate a conda environment.<br>    clean               Remove unused packages and caches.<br>    commands            List all available conda subcommands (including those from plugins). Generally only used by</pre><p><strong>4. Essential Builds and Python3 on terminal</strong></p><pre>$ sudo apt install build-essential pkg-config cmake ninja-build<br><br>$ sudo apt install python3 python3-venv python3-pip python3-dev python3-setuptools python3-wheel</pre><p><strong>5. CUDA Toolkit Installation</strong></p><p>Here comes the doubt and confusion whether which Cuda toolkit is to be installed. For Popular Deep learning Frameworks like Pytorch or Tensorflow, just go for Cuda toolkit 11.8 which supports almost everything for your project needs. To install Cuda toolkit with just two simple commands,</p><pre>$ wget https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_450.51.05_linux.run<br>$ sudo sh cuda_11.8.0_450.51.05_linux.run</pre><ul><li>In the appearing menu, ‘continue’ should be selected and ‘accept’ should be entered in the subsequent prompt.</li><li>In the final menu, the selected Nvidia driver version 530 should be deselected, and then by clicking ‘install’, the installation is completed.</li></ul><p>Now type,</p><pre>$ nvcc --version<br>nvcc: NVIDIA (R) Cuda compiler driver<br>Copyright (c) 2005-2022 NVIDIA Corporation<br>Built on Wed_Sep_21_10:33:58_PDT_2022<br>Cuda compilation tools, release 11.8, V11.8.89<br>Build cuda_11.8.r11.8/compiler.31833905_0</pre><p>If you are finding an error, just reboot your device and run update.sh to make changes. That should do it.</p><p><strong>6. Pytorch or Tensorflow</strong></p><p>I know many people work with tensorflow which is really good for deployment. Majorly these set of people use to for easier deployment who found this framework in some hackathons or assignment tasks.</p><p>While I don’t hate tensorflow but you have to know that as a beginner in Machine learning, many research papers are written on certain Deep learning framework. Majorly, Pytorch with amounts to about more than 85% since 2020. Below data plot from Assembly AI,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/747/1*DC-YHFiRAmcs6NfnxKWk4Q.png" /></figure><p>Any day, go for Pytorch without a second guess where both Models and Research papers are being written on this framework. So, to install Pytorch, you have to create a virtual environment because you just can’t dump everything in your base conda environment. If you still are doubtful about Pytorch, once do check out this video from Lex Friedman’s podcast with Ishan Misra.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FcLLsc4Hlo-8%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DcLLsc4Hlo-8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FcLLsc4Hlo-8%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/2da3ae57bf766eedb88eb56d55ebcab5/href">https://medium.com/media/2da3ae57bf766eedb88eb56d55ebcab5/href</a></iframe><p>I do suggest for people to switch from pip to uv.</p><p><strong>What is uv anyway?</strong></p><p>An extremely fast Python package and project manager, written in Rust.</p><ul><li>🚀 A single tool to replace pip, pip-tools, pipx, poetry, pyenv, twine, virtualenv, and more.</li><li>⚡️ <a href="https://github.com/astral-sh/uv/blob/main/BENCHMARKS.md">10–100x faster</a> than pip.</li></ul><p><a href="https://github.com/astral-sh/uv">GitHub - astral-sh/uv: An extremely fast Python package and project manager, written in Rust.</a></p><pre>$ uv venv create -n pytorch-gpu -p python3.10<br><br>#Activating<br><br>$ source pytorch-gpu/bin/activate<br><br>(pytorch-gpu) $ python --version<br>                Python 3.10.16</pre><p>Then, for Pytorch on Gpu(Nvidia):</p><p><a href="https://pytorch.org/get-started/locally/">Get Started</a></p><pre>$ uv pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118</pre><p>If your network is fast enough, it should take about 4–5 minutes and then,</p><pre>(pytorch-gpu)$ python -c &quot;import torch; print(torch.cuda.is_available())&quot;<br>               True    <br>(pytorch-gpu) $ python -c &quot;import torch; print(torch.cuda.get_device_name(0))&quot;<br>NVIDIA GeForce RTX 4060 Laptop GPU         </pre><p><strong>That “AHA Moment”.</strong> To be honest, I reinstalled my Ubuntu for about 10–12 times with Cuda compatibility errors, python version compatibility and environment variables, etc. Finally got it right.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*EDu6UOpfThSnSgiOdlvSDg.jpeg" /></figure><p>Since, this is my first article , please feel free to give your feedback in the responses and any help during your DL Environment Setup, you can also connect with me on LinkedIn:</p><p><a href="https://www.linkedin.com/in/tata-vishnu-vardhan-rao-aa907627a/">https://www.linkedin.com/in/tata-vishnu-vardhan-rao-aa907627a/</a></p><p>If you found this article helpful, please clap, response and share to your fellow Geeks!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=11c036ea6bb4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>