<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tutorials &#8211; NoloWiz</title>
	<atom:link href="https://nolowiz.com/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>https://nolowiz.com</link>
	<description>Technology news, tips and tutorials</description>
	<lastBuildDate>Sun, 16 Aug 2026 11:59:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.13</generator>

<image>
	<url>https://nolowiz.com/wp-content/uploads/2021/01/cropped-android-chrome-512x512-2-32x32.png</url>
	<title>Tutorials &#8211; NoloWiz</title>
	<link>https://nolowiz.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How Run llama.cpp on Runpod &#8211; Step by step Guide</title>
		<link>https://nolowiz.com/how-run-llama-cpp-on-runpod-step-by-step-guide/</link>
		
		<dc:creator><![CDATA[Rupesh Sreeraman]]></dc:creator>
		<pubDate>Sun, 16 Aug 2026 11:58:00 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<guid isPermaLink="false">https://nolowiz.com/?p=7394</guid>

					<description><![CDATA[<p>In this tutorial we discuss how to run and use llama.cpp on Runpod. RunPod is a cloud platform that lets you rent powerful GPUs on demand for AI workloads such as running LLMs, image generation, video generation, and model training. It provides access to GPUs like NVIDIA RTX 5090, A100, and H100 without needing to ... <a title="How Run llama.cpp on Runpod &#8211; Step by step Guide" class="read-more" href="https://nolowiz.com/how-run-llama-cpp-on-runpod-step-by-step-guide/" aria-label="More on How Run llama.cpp on Runpod &#8211; Step by step Guide">Read more</a></p>
<p>The post <a rel="nofollow" href="https://nolowiz.com/how-run-llama-cpp-on-runpod-step-by-step-guide/">How Run llama.cpp on Runpod &#8211; Step by step Guide</a> appeared first on <a rel="nofollow" href="https://nolowiz.com">NoloWiz</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>In this tutorial we discuss how to run and use llama.cpp on Runpod.</p>



<p><a href="https://www.runpod.io/" target="_blank" rel="noreferrer noopener">RunPod </a>is a cloud platform that lets you rent powerful GPUs on demand for AI workloads such as running LLMs, image generation, video generation, and model training. It provides access to GPUs like NVIDIA RTX 5090, A100, and H100 without needing to own the hardware.</p>



<p>First create and account in rupod and recharge. Next we need to create a pod for that we need to select a GPU for this demo I&#8217;m going to use RTX 5090 GPU(32 GB VRAM). A Pod in RunPod is a rented cloud computer with a GPU. You choose a GPU, CPU, RAM, storage, and an image/template, then RunPod creates the Pod where you can run AI models, Docker containers, or other applications.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="318" src="https://nolowiz.com/wp-content/uploads/2026/08/image-1024x318.png" alt="" class="wp-image-7425" srcset="https://nolowiz.com/wp-content/uploads/2026/08/image-1024x318.png 1024w, https://nolowiz.com/wp-content/uploads/2026/08/image-300x93.png 300w, https://nolowiz.com/wp-content/uploads/2026/08/image-768x239.png 768w, https://nolowiz.com/wp-content/uploads/2026/08/image-150x47.png 150w, https://nolowiz.com/wp-content/uploads/2026/08/image.png 1486w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p></p>



<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2735334721002354"
     crossorigin="anonymous"></script>
<!-- article-horizontal -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-2735334721002354"
     data-ad-slot="8835878737"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>



<p></p>



<p>Next we will keep pod template as it is. Change the storage configuration to Volume disk. Refer the configuration screenshot below  :</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="483" src="https://nolowiz.com/wp-content/uploads/2026/08/image-1-1024x483.png" alt="" class="wp-image-7427" srcset="https://nolowiz.com/wp-content/uploads/2026/08/image-1-1024x483.png 1024w, https://nolowiz.com/wp-content/uploads/2026/08/image-1-300x141.png 300w, https://nolowiz.com/wp-content/uploads/2026/08/image-1-768x362.png 768w, https://nolowiz.com/wp-content/uploads/2026/08/image-1-150x71.png 150w, https://nolowiz.com/wp-content/uploads/2026/08/image-1.png 1251w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Next click the &#8220;Deploy-On-Demand&#8221; button and you will see a deploying screen as shown below.</p>



<figure class="wp-block-image size-full"><img loading="lazy" width="598" height="242" src="https://nolowiz.com/wp-content/uploads/2026/08/pod-init.jpg" alt="" class="wp-image-7400" srcset="https://nolowiz.com/wp-content/uploads/2026/08/pod-init.jpg 598w, https://nolowiz.com/wp-content/uploads/2026/08/pod-init-300x121.jpg 300w, https://nolowiz.com/wp-content/uploads/2026/08/pod-init-150x61.jpg 150w" sizes="(max-width: 598px) 100vw, 598px" /></figure>



<p></p>



<p>After the pod initalized, we need edit port number click the edit pod by clicking the pods hamberger menu on the right side. Change HTTP port to 8080 and save.</p>



<figure class="wp-block-image size-full"><img loading="lazy" width="874" height="711" src="https://nolowiz.com/wp-content/uploads/2026/08/edit-port.png" alt="" class="wp-image-7405" srcset="https://nolowiz.com/wp-content/uploads/2026/08/edit-port.png 874w, https://nolowiz.com/wp-content/uploads/2026/08/edit-port-300x244.png 300w, https://nolowiz.com/wp-content/uploads/2026/08/edit-port-768x625.png 768w, https://nolowiz.com/wp-content/uploads/2026/08/edit-port-150x122.png 150w" sizes="(max-width: 874px) 100vw, 874px" /></figure>



<p>Enable web terminal and open web terminal in browser.</p>



<figure class="wp-block-image size-full"><img loading="lazy" width="604" height="185" src="https://nolowiz.com/wp-content/uploads/2026/08/enable-web-terminal.png" alt="" class="wp-image-7402" srcset="https://nolowiz.com/wp-content/uploads/2026/08/enable-web-terminal.png 604w, https://nolowiz.com/wp-content/uploads/2026/08/enable-web-terminal-300x92.png 300w, https://nolowiz.com/wp-content/uploads/2026/08/enable-web-terminal-150x46.png 150w" sizes="(max-width: 604px) 100vw, 604px" /></figure>



<p>Install llama.cpp by running the below command :</p>



<pre class="wp-block-code"><code>curl -LsSf https://llama.app/install.sh | sh</code></pre>



<figure class="wp-block-image size-full"><img loading="lazy" width="773" height="371" src="https://nolowiz.com/wp-content/uploads/2026/08/llamacpp-install.png" alt="" class="wp-image-7408" srcset="https://nolowiz.com/wp-content/uploads/2026/08/llamacpp-install.png 773w, https://nolowiz.com/wp-content/uploads/2026/08/llamacpp-install-300x144.png 300w, https://nolowiz.com/wp-content/uploads/2026/08/llamacpp-install-768x369.png 768w, https://nolowiz.com/wp-content/uploads/2026/08/llamacpp-install-150x72.png 150w" sizes="(max-width: 773px) 100vw, 773px" /></figure>



<p>Now we have installed llama.cpp. Lets check the GPU by running <code>nvidia-smi</code> command.</p>



<figure class="wp-block-image size-full"><img loading="lazy" width="809" height="398" src="https://nolowiz.com/wp-content/uploads/2026/08/rtx-5090-gpu.png" alt="" class="wp-image-7428" srcset="https://nolowiz.com/wp-content/uploads/2026/08/rtx-5090-gpu.png 809w, https://nolowiz.com/wp-content/uploads/2026/08/rtx-5090-gpu-300x148.png 300w, https://nolowiz.com/wp-content/uploads/2026/08/rtx-5090-gpu-768x378.png 768w, https://nolowiz.com/wp-content/uploads/2026/08/rtx-5090-gpu-150x74.png 150w" sizes="(max-width: 809px) 100vw, 809px" /></figure>



<p>Next we will <a href="https://huggingface.co/unsloth/Qwen3.8-27B-GGUF" target="_blank" rel="noreferrer noopener">Qwen 3.8 27B</a> model run the below command to download it.</p>



<pre class="wp-block-code"><code>curl -L -C - -o Qwen3.8-27B-Q4_K_M.gguf https://huggingface.co/unsloth/Qwen3.8-27B-GGUF/resolve/main/Qwen3.8-27B-Q4_K_M.gguf</code></pre>



<p>Run the below command to start the llama </p>



<pre class="wp-block-code"><code>~/.llama-app/llama serve -m Qwen3.8-27B-Q4_K_M.gguf -ngl 99 --host 0.0.0.0 --port 8080 -c 8192</code></pre>



<p>Next we need to copy the pod ID by opening pod page :</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="176" src="https://nolowiz.com/wp-content/uploads/2026/08/pod-id-copy-1024x176.png" alt="" class="wp-image-7413" srcset="https://nolowiz.com/wp-content/uploads/2026/08/pod-id-copy-1024x176.png 1024w, https://nolowiz.com/wp-content/uploads/2026/08/pod-id-copy-300x52.png 300w, https://nolowiz.com/wp-content/uploads/2026/08/pod-id-copy-768x132.png 768w, https://nolowiz.com/wp-content/uploads/2026/08/pod-id-copy-150x26.png 150w, https://nolowiz.com/wp-content/uploads/2026/08/pod-id-copy.png 1257w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p></p>



<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2735334721002354"
     crossorigin="anonymous"></script>
<!-- article-horizontal -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-2735334721002354"
     data-ad-slot="8835878737"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>



<p></p>



<p>Now we can access the llama.cpp webui on your browser :</p>



<pre class="wp-block-code"><code>https:&#47;&#47;{YOUR_RUNPOD_ID}-8080.proxy.runpod.net/</code></pre>



<p>In my case my runpod ID is psyvpxd4isy2vu and I can access llama.cpp in  https://psyvpxd4isy2vu-8080.proxy.runpod.net/</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="475" src="https://nolowiz.com/wp-content/uploads/2026/08/runpod-llamacpp-1024x475.png" alt="" class="wp-image-7416" srcset="https://nolowiz.com/wp-content/uploads/2026/08/runpod-llamacpp-1024x475.png 1024w, https://nolowiz.com/wp-content/uploads/2026/08/runpod-llamacpp-300x139.png 300w, https://nolowiz.com/wp-content/uploads/2026/08/runpod-llamacpp-768x356.png 768w, https://nolowiz.com/wp-content/uploads/2026/08/runpod-llamacpp-150x70.png 150w, https://nolowiz.com/wp-content/uploads/2026/08/runpod-llamacpp.png 1120w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>We can see the llama.cpp webui in browser :</p>



<figure class="wp-block-image size-full"><img loading="lazy" width="730" height="561" src="https://nolowiz.com/wp-content/uploads/2026/08/image-2.png" alt="" class="wp-image-7430" srcset="https://nolowiz.com/wp-content/uploads/2026/08/image-2.png 730w, https://nolowiz.com/wp-content/uploads/2026/08/image-2-300x231.png 300w, https://nolowiz.com/wp-content/uploads/2026/08/image-2-150x115.png 150w" sizes="(max-width: 730px) 100vw, 730px" /></figure>



<p>After the use we can stop and terminate pod.</p>



<h2>Conclusion</h2>



<p>Running llama.cpp on RunPod provides a simple and cost-effective way to run large language models on powerful NVIDIA GPUs without requiring local GPU hardware. In this guide, we created a RunPod Pod with an RTX 5090, installed llama.cpp, downloaded a GGUF model, configured GPU offloading, and exposed the llama.cpp web interface through RunPod&#8217;s proxy.</p>
<p><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fnolowiz.com%2Fhow-run-llama-cpp-on-runpod-step-by-step-guide%2F&amp;linkname=How%20Run%20llama.cpp%20on%20Runpod%20%E2%80%93%20Step%20by%20step%20Guide" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Fnolowiz.com%2Fhow-run-llama-cpp-on-runpod-step-by-step-guide%2F&amp;linkname=How%20Run%20llama.cpp%20on%20Runpod%20%E2%80%93%20Step%20by%20step%20Guide" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fnolowiz.com%2Fhow-run-llama-cpp-on-runpod-step-by-step-guide%2F&amp;linkname=How%20Run%20llama.cpp%20on%20Runpod%20%E2%80%93%20Step%20by%20step%20Guide" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Fnolowiz.com%2Fhow-run-llama-cpp-on-runpod-step-by-step-guide%2F&amp;linkname=How%20Run%20llama.cpp%20on%20Runpod%20%E2%80%93%20Step%20by%20step%20Guide" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fnolowiz.com%2Fhow-run-llama-cpp-on-runpod-step-by-step-guide%2F&#038;title=How%20Run%20llama.cpp%20on%20Runpod%20%E2%80%93%20Step%20by%20step%20Guide" data-a2a-url="https://nolowiz.com/how-run-llama-cpp-on-runpod-step-by-step-guide/" data-a2a-title="How Run llama.cpp on Runpod – Step by step Guide"></a></p><p>The post <a rel="nofollow" href="https://nolowiz.com/how-run-llama-cpp-on-runpod-step-by-step-guide/">How Run llama.cpp on Runpod &#8211; Step by step Guide</a> appeared first on <a rel="nofollow" href="https://nolowiz.com">NoloWiz</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>ECS vs EC2: What&#8217;s the Difference and Which One Should You Use?</title>
		<link>https://nolowiz.com/ecs-vs-ec2-whats-the-difference-and-which-one-should-you-use/</link>
		
		<dc:creator><![CDATA[Rupesh Sreeraman]]></dc:creator>
		<pubDate>Tue, 21 Jul 2026 00:23:21 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<guid isPermaLink="false">https://nolowiz.com/?p=7206</guid>

					<description><![CDATA[<p>If you&#8217;ve spent any time reading about AWS, you&#8217;ve probably run into the question &#8220;ECS vs EC2?&#8221; and if the two names felt confusingly similar, you&#8217;re not alone. The truth is that comparing ECS and EC2 is a bit like comparing a delivery company to a truck. They&#8217;re related, they often work together, and in ... <a title="ECS vs EC2: What&#8217;s the Difference and Which One Should You Use?" class="read-more" href="https://nolowiz.com/ecs-vs-ec2-whats-the-difference-and-which-one-should-you-use/" aria-label="More on ECS vs EC2: What&#8217;s the Difference and Which One Should You Use?">Read more</a></p>
<p>The post <a rel="nofollow" href="https://nolowiz.com/ecs-vs-ec2-whats-the-difference-and-which-one-should-you-use/">ECS vs EC2: What&#8217;s the Difference and Which One Should You Use?</a> appeared first on <a rel="nofollow" href="https://nolowiz.com">NoloWiz</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>If you&#8217;ve spent any time reading about AWS, you&#8217;ve probably run into the question &#8220;ECS vs EC2?&#8221;  and if the two names felt confusingly similar, you&#8217;re not alone. The truth is that comparing ECS and EC2 is a bit like comparing a <em>delivery company</em> to a <em>truck</em>. They&#8217;re related, they often work together, and in many setups one literally runs on top of the other.</p>



<p>In this article we&#8217;ll clear up the confusion, explain what each service actually does, and give you a practical framework for deciding what to use for your own workloads.</p>



<h2>The Short Answer</h2>



<p><strong>EC2 (Elastic Compute Cloud)</strong> gives you virtual servers in the cloud. You get an operating system, CPU, memory, and storage, and you&#8217;re responsible for everything you run on it.</p>



<p><strong>ECS (Elastic Container Service)</strong> is a container orchestration service. It decides <em>where</em> and <em>how</em> your Docker containers run, restarts them when they crash, and scales them up and down.</p>



<p>The key thing most comparison articles bury: ECS is not an alternative to EC2  ECS runs on top of compute, and one of its two options for that compute is EC2 itself. The real decision isn&#8217;t usually &#8220;ECS <em>or</em> EC2.&#8221; It&#8217;s &#8220;should I manage my containers directly on EC2 by hand, or let ECS orchestrate them for me?&#8221;</p>



<p></p>



<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2735334721002354"
     crossorigin="anonymous"></script>
<!-- article-horizontal -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-2735334721002354"
     data-ad-slot="8835878737"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>



<p></p>



<h2>What Is EC2?</h2>



<p>EC2 is AWS&#8217;s Infrastructure-as-a-Service (IaaS) offering. When you launch an EC2 instance, you&#8217;re renting a virtual machine. You choose:</p>



<ul><li>An instance type (how much CPU and RAM &#8211; e.g. <code>t3.micro</code>, <code>m5.large</code>)</li><li>An AMI (the base image / operating system, like Amazon Linux or Ubuntu)</li><li>Storage (EBS volumes)</li><li>Networking (VPC, security groups, public/private IPs)</li></ul>



<p>Once it boots, that server is yours to manage. You SSH in, install software, deploy your application, patch the OS, and handle scaling. That flexibility is EC2&#8217;s biggest strength and its biggest burden  you can run <em>anything</em>, but you also <em>maintain</em> everything.</p>



<p>EC2 is a good fit when you need:</p>



<ul><li>Full control over the operating system and environment</li><li>Traditional (non-containerized) applications</li><li>Specialized software that expects a full server</li><li>Long-running workloads where you want to fine-tune the machine</li></ul>



<h2>What Is ECS?</h2>



<p>ECS is a container orchestration platform. If your application is packaged as Docker containers, ECS handles the operational hard parts for you:</p>



<ul><li><strong>Scheduling</strong> &#8211; placing containers onto available compute</li><li><strong>Health checks and self-healing</strong> &#8211; restarting failed containers automatically</li><li><strong>Scaling</strong> &#8211; running more or fewer copies based on load</li><li><strong>Service discovery and load balancing</strong> &#8211; integrating with an Application Load Balancer</li><li><strong>Rolling deployments</strong> &#8211; updating your app without downtime</li></ul>



<p>In ECS you define a task definition (a blueprint describing your container image, CPU/memory, ports, and environment variables), then run it as a task or a long-running <strong>service</strong>.</p>



<p></p>



<p>Here&#8217;s a simplified task definition to make it concrete:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="json" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">{
  "family": "my-web-app",
  "networkMode": "awsvpc",
  "containerDefinitions": [
    {
      "name": "web",
      "image": "123456789.dkr.ecr.us-east-1.amazonaws.com/my-web-app:latest",
      "cpu": 256,
      "memory": 512,
      "portMappings": [
        { "containerPort": 80, "protocol": "tcp" }
      ]
    }
  ],
  "requiresCompatibilities": ["FARGATE"],
  "cpu": "256",
  "memory": "512"
}</pre>



<p>Notice there&#8217;s nothing in there about <em>which server</em> this runs on. That&#8217;s the point of orchestration  you describe <em>what</em> you want running, and ECS figures out <em>where</em>.</p>



<h2>The Part That Confuses Everyone: ECS Launch Types</h2>



<p>ECS still needs actual compute to run your containers on. It offers two ways to provide it, and this is where EC2 re-enters the picture.</p>



<h3>1.ECS on EC2 (the EC2 launch type) </h3>



<p>You run a cluster of EC2 instances that you own and manage, and ECS packs your containers onto them. You&#8217;re still responsible for the instances  patching, scaling the cluster, right-sizing but ECS handles the container-level orchestration on top.</p>



<p>Choose this when you want lower cost at scale, need specific instance types (GPUs, high memory), or want fine-grained control over the underlying hosts.</p>



<h3>2.ECS on Fargate (the Fargate launch type)</h3>



<p>Fargate is serverless compute for containers. There are no EC2 instances for you to see or manage you just specify how much CPU and memory each task needs, and AWS provisions the compute invisibly. You pay only for the resources your tasks use while they run.</p>



<p>Choose this when you want zero server management, variable or bursty workloads, and the simplest possible operations, and you&#8217;re willing to pay a bit more per unit of compute for that convenience.</p>



<figure class="wp-block-image size-full"><img loading="lazy" width="677" height="490" src="https://nolowiz.com/wp-content/uploads/2026/07/EC2-vs-ECS-comparison-nolowiz.jpg" alt="EC2 vs ECS compariosn image" class="wp-image-7210" srcset="https://nolowiz.com/wp-content/uploads/2026/07/EC2-vs-ECS-comparison-nolowiz.jpg 677w, https://nolowiz.com/wp-content/uploads/2026/07/EC2-vs-ECS-comparison-nolowiz-300x217.jpg 300w, https://nolowiz.com/wp-content/uploads/2026/07/EC2-vs-ECS-comparison-nolowiz-150x109.jpg 150w" sizes="(max-width: 677px) 100vw, 677px" /></figure>



<h2>So Which One Should You Use?</h2>



<p>Instead of picking &#8220;ECS vs EC2&#8221; as rivals, walk through these questions:</p>



<p><strong>Is your application containerized (Docker)?</strong> If no, and you don&#8217;t plan to containerize it, plain <strong>EC2</strong> is your natural home. Run it like a traditional server.</p>



<p>If yes, you almost certainly want an orchestrator, which means <strong>ECS</strong> (or EKS if you specifically need Kubernetes).</p>



<p>If you&#8217;re using ECS, how much do you want to manage the servers?</p>



<ul><li>Want AWS to handle the compute entirely and value simplicity &#8211; <strong>ECS on Fargate</strong></li><li>Want lower cost at scale or need special instance types, and are comfortable managing a cluster &#8211; <strong>ECS on EC2</strong></li></ul>



<h3>A quick rule of thumb:</h3>



<ul><li>Single traditional app, or you need OS-level control &#8211; <strong>EC2</strong></li><li>Containers, and you want the least operational work &#8211; <strong>ECS + Fargate</strong></li><li>Containers at large scale where cost matters &#8211; <strong>ECS + EC2</strong></li></ul>



<p></p>



<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2735334721002354"
     crossorigin="anonymous"></script>
<!-- article-horizontal -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-2735334721002354"
     data-ad-slot="8835878737"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>



<h2>A Note on Pricing</h2>



<p>Pricing is where the trade-offs become tangible, and AWS pricing changes over time, so always confirm current rates in the AWS pricing calculator. In general terms:</p>



<ul><li><strong>EC2</strong> &#8211; you pay for the instance whether it&#8217;s busy or idle. Reserved Instances and Savings Plans cut costs significantly for steady workloads.</li><li><strong>ECS itself</strong> &#8211; there&#8217;s no extra charge for the ECS control plane. You only pay for the underlying compute.</li><li><strong>ECS on EC2</strong> &#8211; you pay standard EC2 prices, so you can hit lower per-unit costs at scale but you pay for idle capacity.</li><li><strong>ECS on Fargate</strong> &#8211; you pay per vCPU and GB of memory that your tasks consume, billed by the second. Simpler and often cheaper for spiky or low-utilization workloads, but usually pricier per unit for constant, high-utilization ones.</li></ul>



<h2>Frequently Asked Questions</h2>



<p><strong>Is ECS a replacement for EC2?</strong> No. ECS orchestrates containers and can even run <em>on</em> EC2. They solve different problems and frequently work together.</p>



<p><strong>Can I run containers on EC2 without ECS?</strong> Yes, you can install Docker on an EC2 instance and run containers manually. But you&#8217;d be hand-building the scheduling, health checks, and scaling that ECS gives you for free.</p>



<p><strong>What about EKS?</strong> EKS is AWS&#8217;s managed Kubernetes service. It&#8217;s an alternative to ECS for orchestration (not to EC2), and it also runs on EC2 or Fargate. Choose EKS if you specifically want Kubernetes; choose ECS for a simpler, more AWS-native experience.</p>



<p><strong>What&#8217;s the difference between Fargate and EC2 for ECS?</strong> Both provide the compute ECS runs on. With EC2 you manage the servers; with Fargate you don&#8217;t manage any servers at all.</p>



<h2>Conclusion</h2>



<p>&#8220;ECS vs EC2&#8221; is really a comparison between a <em>building block</em> (EC2, raw virtual servers) and a <em>management layer</em> (ECS, container orchestration)  and ECS often sits directly on top of EC2. If you&#8217;re running traditional applications and want full control, EC2 is your foundation. If you&#8217;re running Docker containers and want automated scheduling, scaling, and healing, ECS is the tool, and your next choice is simply whether to back it with EC2 (more control, cheaper at scale) or Fargate (zero server management). Get that mental model right and the &#8220;versus&#8221; mostly disappears  you&#8217;ll know exactly which piece you need, and when to combine them.</p>
<p><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fnolowiz.com%2Fecs-vs-ec2-whats-the-difference-and-which-one-should-you-use%2F&amp;linkname=ECS%20vs%20EC2%3A%20What%E2%80%99s%20the%20Difference%20and%20Which%20One%20Should%20You%20Use%3F" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Fnolowiz.com%2Fecs-vs-ec2-whats-the-difference-and-which-one-should-you-use%2F&amp;linkname=ECS%20vs%20EC2%3A%20What%E2%80%99s%20the%20Difference%20and%20Which%20One%20Should%20You%20Use%3F" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fnolowiz.com%2Fecs-vs-ec2-whats-the-difference-and-which-one-should-you-use%2F&amp;linkname=ECS%20vs%20EC2%3A%20What%E2%80%99s%20the%20Difference%20and%20Which%20One%20Should%20You%20Use%3F" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Fnolowiz.com%2Fecs-vs-ec2-whats-the-difference-and-which-one-should-you-use%2F&amp;linkname=ECS%20vs%20EC2%3A%20What%E2%80%99s%20the%20Difference%20and%20Which%20One%20Should%20You%20Use%3F" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fnolowiz.com%2Fecs-vs-ec2-whats-the-difference-and-which-one-should-you-use%2F&#038;title=ECS%20vs%20EC2%3A%20What%E2%80%99s%20the%20Difference%20and%20Which%20One%20Should%20You%20Use%3F" data-a2a-url="https://nolowiz.com/ecs-vs-ec2-whats-the-difference-and-which-one-should-you-use/" data-a2a-title="ECS vs EC2: What’s the Difference and Which One Should You Use?"></a></p><p>The post <a rel="nofollow" href="https://nolowiz.com/ecs-vs-ec2-whats-the-difference-and-which-one-should-you-use/">ECS vs EC2: What&#8217;s the Difference and Which One Should You Use?</a> appeared first on <a rel="nofollow" href="https://nolowiz.com">NoloWiz</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Mastering Git Worktree: How to Work on Multiple Branches at Once</title>
		<link>https://nolowiz.com/mastering-git-worktree-how-to-work-on-multiple-branches-at-once/</link>
		
		<dc:creator><![CDATA[Rupesh Sreeraman]]></dc:creator>
		<pubDate>Thu, 28 May 2026 13:03:53 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<guid isPermaLink="false">https://nolowiz.com/?p=7095</guid>

					<description><![CDATA[<p>If you&#8217;ve ever been in the middle of a feature branch and suddenly a critical bug pops up on main, you know the drill: Stash your changes. Checkout main. Fix the bug. Commit. Checkout back to your feature branch. Stash pop. Sound tedious? You&#8217;re not alone. But there&#8217;s a better way. Today, I&#8217;m going to ... <a title="Mastering Git Worktree: How to Work on Multiple Branches at Once" class="read-more" href="https://nolowiz.com/mastering-git-worktree-how-to-work-on-multiple-branches-at-once/" aria-label="More on Mastering Git Worktree: How to Work on Multiple Branches at Once">Read more</a></p>
<p>The post <a rel="nofollow" href="https://nolowiz.com/mastering-git-worktree-how-to-work-on-multiple-branches-at-once/">Mastering Git Worktree: How to Work on Multiple Branches at Once</a> appeared first on <a rel="nofollow" href="https://nolowiz.com">NoloWiz</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>If you&#8217;ve ever been in the middle of a feature branch and suddenly a critical bug pops up on main, you know the drill:</p>



<ol><li>Stash your changes.</li><li>Checkout main.</li><li>Fix the bug.</li><li>Commit.</li><li>Checkout back to your feature branch.</li><li>Stash pop. Sound tedious? You&#8217;re not alone.</li></ol>



<p>But there&#8217;s a better way. Today, I&#8217;m going to introduce you to one of Git&#8217;s most underrated features: git worktree!</p>



<h2>What Is Git Worktree?</h2>



<p>In simple terms, git worktree lets you work on multiple branches of the same repository simultaneously, each in its own directory.</p>



<p>Normally, Git only lets you be on one branch at a time. To switch branches, you either commit, stash, or discard your current work. With worktrees, you get separate working directories that all share the<br>same <code>.git</code> folder  meaning you can be on feature-x in one window and main in another, without any stashing or switching.</p>



<p></p>



<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2735334721002354"
     crossorigin="anonymous"></script>
<!-- article-horizontal -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-2735334721002354"
     data-ad-slot="8835878737"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>



<p></p>



<h2>The Problem It Solves</h2>



<p>Imagine you are working on a feature branch (<code>feature-x</code>) and a critical bug appears on the <code>main</code> branch.</p>



<ul><li><strong>Without worktree:</strong> You <code>stash</code> your changes, <code>checkout</code> main, fix the bug, <code>commit</code>, and then <code>stash</code> pop back to your feature.</li><li><strong>With worktree:</strong> You simply open a second terminal or directory for <code>main</code>, fix the bug, and leave your feature branch untouched in the first directory.</li></ul>



<p>That&#8217;s it. No stashing. No context switching. No lost mental momentum.</p>



<h2>How to Use It</h2>



<h3>1. Create a new worktree</h3>



<p>Run the following command :</p>



<pre class="wp-block-code"><code>git worktree add -b fix-bug ../fix-bug main</code></pre>



<p>This creates a new folder (<code>../fix-bug</code>), creates a new branch named <code>fix-bug</code> based on <code>main</code>, and checks it out for you automatically.</p>



<h3>2. List All Worktrees</h3>



<p>Run the below command to list all worktrees :</p>



<pre class="wp-block-code"><code>git worktree list</code></pre>



<p><strong>Output</strong> :</p>



<pre class="wp-block-code"><code>/path/to/repo       (master)
/path/to/fix-bug    (fix-bug)</code></pre>



<h3>3. Work on the new branch</h3>



<p>Navigate into your new directory (<code>cd ../fix-bug</code>). Here, you can make commits, run tests, or mess with dependencies completely independently from your original repository. Your main repo&#8217;s working directory remains completely untouched.</p>



<h3>4. Remove a Worktree</h3>



<p>When you are finished with your changes and have pushed or merged your work, you can clean up:</p>



<pre class="wp-block-code"><code>git worktree remove ../fix-bug</code></pre>



<p><strong>Note</strong>: This safely deletes the <code>../fix-bug</code> directory. It does <strong>not</strong> delete the branch itself from Git history. If you want to completely delete the branch too, you can now safely run <code>git branch -d fix-bug</code> from your main repository directory.</p>



<p></p>



<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2735334721002354"
     crossorigin="anonymous"></script>
<!-- article-horizontal -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-2735334721002354"
     data-ad-slot="8835878737"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>



<p></p>



<h2>Common Use Cases</h2>



<ul><li><strong>Fixing urgent bugs</strong> &#8211; Work on main for a hotfix while keeping your feature branch clean in the main terminal.</li><li><strong>Testing</strong> &#8211; Test a specific branch without having to switch your current working state.</li><li><strong>Code reviews</strong> &#8211; Pull down a colleague&#8217;s PR in a separate folder without merging it into your local repo.</li><li><strong>Documentation</strong> &#8211; Work on both code and docs in parallel without switching branches.</li><li><strong>AI Agents &amp; Copilots</strong> &#8211;  In 2026, we see a massive spike in worktree usage driven by coding AI agents (like <a href="https://code.claude.com/docs/en/worktrees" target="_blank" rel="noreferrer noopener">Claude Code</a>, GitHub Copilot Workspace, or OpenAI Codex). These tools often spin up isolated background git worktrees to write features, run automated tests, and fix bugs without disrupting the developer’s active screen.</li></ul>



<h2>Git Worktree Anti-Patterns to avoid</h2>



<h3>1. Checking Out the Same Branch Twice</h3>



<pre class="wp-block-code"><code>git worktree add ../fix main   # fails if already on main</code></pre>



<p><strong>Why:</strong> Git hard-blocks this. Each worktree must be on a unique branch.</p>



<h3>2. Rebasing/Amending a Branch Another Worktree Is Using</h3>



<pre class="wp-block-code"><code># Worktree A is on feature-x
# In main worktree — DON'T do this:
git rebase -i HEAD~3 feature-x   # corrupts worktree A's HEAD</code></pre>



<p><strong>Why:</strong> History rewrite orphans the other worktree&#8217;s commits.</p>



<h3>3. Putting Worktrees Inside the Repo Folder</h3>



<pre class="wp-block-code"><code>git worktree add ./fix-bug -b fix-bug main   # inside repo</code></pre>



<p><strong>Why:</strong> Causes <code>.gitignore</code> headaches, accidental commits of worktree folders, and confusing <code>git status</code> output. Always place worktrees <strong>outside</strong> or as siblings:</p>



<pre class="wp-block-code"><code>git worktree add ../fix-bug -b fix-bug main  # Correct - sibling folder</code></pre>



<h3>4. Forgetting to Remove Stale Worktrees</h3>



<pre class="wp-block-code"><code># Manually deleted the folder but never ran:
git worktree remove fix-bug</code></pre>



<p><strong>Why:</strong> Git still tracks it internally. Builds up ghost entries. Always clean up:</p>



<pre class="wp-block-code"><code>git worktree prune    # removes stale entries
git worktree list     # verify</code></pre>



<h3>5. Running Git Commands That Affect Shared State From Wrong Worktree</h3>



<pre class="wp-block-code"><code># From fix-bug worktree — dangerous:
git branch -D feature-x     # deletes branch another worktree is on
git tag -f v1.0              # moves a tag others depend on
git gc --aggressive          # can corrupt shared object store mid-work</code></pre>



<p><strong>Why:</strong> All worktrees share the same <code>.git</code> &#8211; destructive commands affect everyone.</p>



<h3>6. Using Worktrees With Submodules Carelessly</h3>



<pre class="wp-block-code"><code>git worktree add ../feature -b feature main
# Submodules are NOT automatically initialized in new worktree</code></pre>



<p><strong>Why:</strong> Submodule state is not automatically carried over. You must manually run:</p>



<pre class="wp-block-code"><code>cd ../feature
git submodule update --init</code></pre>



<p></p>



<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2735334721002354"
     crossorigin="anonymous"></script>
<!-- article-horizontal -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-2735334721002354"
     data-ad-slot="8835878737"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>



<p></p>



<h2>Final Thoughts</h2>



<p>The git worktree is one of those features that, once you start using it, you wonder how you ever lived without it. It&#8217;s lightweight, it&#8217;s built into Git (no plugins needed), and it saves you from the stashing dance every time.</p>



<p></p>
<p><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fnolowiz.com%2Fmastering-git-worktree-how-to-work-on-multiple-branches-at-once%2F&amp;linkname=Mastering%20Git%20Worktree%3A%20How%20to%20Work%20on%20Multiple%20Branches%20at%20Once" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Fnolowiz.com%2Fmastering-git-worktree-how-to-work-on-multiple-branches-at-once%2F&amp;linkname=Mastering%20Git%20Worktree%3A%20How%20to%20Work%20on%20Multiple%20Branches%20at%20Once" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fnolowiz.com%2Fmastering-git-worktree-how-to-work-on-multiple-branches-at-once%2F&amp;linkname=Mastering%20Git%20Worktree%3A%20How%20to%20Work%20on%20Multiple%20Branches%20at%20Once" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Fnolowiz.com%2Fmastering-git-worktree-how-to-work-on-multiple-branches-at-once%2F&amp;linkname=Mastering%20Git%20Worktree%3A%20How%20to%20Work%20on%20Multiple%20Branches%20at%20Once" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fnolowiz.com%2Fmastering-git-worktree-how-to-work-on-multiple-branches-at-once%2F&#038;title=Mastering%20Git%20Worktree%3A%20How%20to%20Work%20on%20Multiple%20Branches%20at%20Once" data-a2a-url="https://nolowiz.com/mastering-git-worktree-how-to-work-on-multiple-branches-at-once/" data-a2a-title="Mastering Git Worktree: How to Work on Multiple Branches at Once"></a></p><p>The post <a rel="nofollow" href="https://nolowiz.com/mastering-git-worktree-how-to-work-on-multiple-branches-at-once/">Mastering Git Worktree: How to Work on Multiple Branches at Once</a> appeared first on <a rel="nofollow" href="https://nolowiz.com">NoloWiz</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to use SearXNG as a Private Search API &#8211; Step-by-Step Guide</title>
		<link>https://nolowiz.com/how-to-use-searxng-as-a-private-search-api-step-by-step-guide/</link>
		
		<dc:creator><![CDATA[Rupesh Sreeraman]]></dc:creator>
		<pubDate>Fri, 06 Feb 2026 12:32:49 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<guid isPermaLink="false">https://nolowiz.com/?p=6906</guid>

					<description><![CDATA[<p>In this step by step guide we will discuss how to install and run SearXNG as private search API, which can be used by apps. What is SearXNG? SearXNG is a free, open-source, self-hosted metasearch engine that aggregates results from multiple search engines without tracking users. It solves the problems of privacy invasion, vendor lock-in, ... <a title="How to use SearXNG as a Private Search API &#8211; Step-by-Step Guide" class="read-more" href="https://nolowiz.com/how-to-use-searxng-as-a-private-search-api-step-by-step-guide/" aria-label="More on How to use SearXNG as a Private Search API &#8211; Step-by-Step Guide">Read more</a></p>
<p>The post <a rel="nofollow" href="https://nolowiz.com/how-to-use-searxng-as-a-private-search-api-step-by-step-guide/">How to use SearXNG as a Private Search API &#8211; Step-by-Step Guide</a> appeared first on <a rel="nofollow" href="https://nolowiz.com">NoloWiz</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>In this step by step guide we will discuss how to install and run SearXNG as private search API, which can be used by apps.</p>



<h2>What is SearXNG?</h2>



<p>SearXNG is a free, open-source, self-hosted metasearch engine that aggregates results from multiple search engines without tracking users. It solves the problems of privacy invasion, vendor lock-in, API costs, and search bias by giving developers full control over search data, sources, and usage.</p>



<p>Here are the<strong> </strong>key benefits of SearXNG:</p>



<ul><li><strong>Privacy-first</strong>: No user tracking, logging, or profiling.</li><li><strong>Self-hosted control</strong>: You own the data, configuration, and infrastructure.</li><li><strong>Multiple search engines</strong>: Aggregates results from many sources(Google,Bing,DuckDuckGo etc) in one query.</li><li><strong>Free &amp; open source</strong>: No API costs, no vendor lock-in.</li><li><strong>API-friendly</strong>: JSON output works well for apps and LLM pipelines.</li><li><strong>Customizable</strong>: Enable/disable engines, formats, languages, and filters.</li><li><strong>Lightweight &amp; fast</strong>: Runs efficiently with minimal resources.</li><li><strong>LLM-ready</strong>: Ideal for RAG, research agents, and private AI workflows.</li><li></li></ul>



<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2735334721002354"
     crossorigin="anonymous"></script>
<!-- article-horizontal -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-2735334721002354"
     data-ad-slot="8835878737"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>



<p></p>



<h2>Step 1: Install Docker and Docker Compose</h2>



<p>First we need to install SerXNG, we will use docker based installation and use.</p>



<ul><li>For Windows users, Download docker desktop  from docker&#8217;s <a href="https://www.docker.com/products/docker-desktop/" target="_blank" rel="noreferrer noopener">official site </a></li><li>Linux users should install docker and docker compose by following the <a href="https://docs.docker.com/desktop/setup/install/linux/" target="_blank" rel="noreferrer noopener">guide</a></li></ul>



<h2> Step 2: Install SearXNG</h2>



<p>Make a directory named &#8220;searxng&#8221;, and create file named <code>docker-compose.yml</code> inside this newly directory. Copy paste the below code.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: yaml; title: ; notranslate">
version: &quot;3.7&quot;

services:
  searxng:
    image: searxng/searxng:latest
    container_name: searxng
    ports:
      - &quot;8080:8080&quot;
    volumes:
      - ./searxng:/etc/searxng
    environment:
      - SEARXNG_BASE_URL=http://localhost:8080/
    restart: unless-stopped

</pre></div>


<p>Next run the below command :</p>



<pre class="wp-block-code"><code>docker-compose up</code></pre>



<p>Wait for the installation to finish, and check the browser by operning the URL http://localhost:8080/.</p>



<figure class="wp-block-image size-full"><img loading="lazy" width="813" height="538" src="https://nolowiz.com/wp-content/uploads/2026/02/searxng-first-run.png" alt="SearXNG running " class="wp-image-6917" srcset="https://nolowiz.com/wp-content/uploads/2026/02/searxng-first-run.png 813w, https://nolowiz.com/wp-content/uploads/2026/02/searxng-first-run-300x199.png 300w, https://nolowiz.com/wp-content/uploads/2026/02/searxng-first-run-768x508.png 768w, https://nolowiz.com/wp-content/uploads/2026/02/searxng-first-run-150x99.png 150w" sizes="(max-width: 813px) 100vw, 813px" /></figure>



<h2>Step 3: Enable API in SearXNG</h2>



<p>To enable and use the API, first install and configure SearXNG, then add JSON support in settings. We need edit the <code>searxng\searxng\settings.yaml</code> file add the json format in the formats settings as shown below :</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: yaml; title: ; notranslate">
search:
  formats:
    - html
    - json  # Add this for API
server:
  secret_key: &quot;your-random-secret-key&quot; 

</pre></div>


<p>Save the settings file and restart the SearXNG container.</p>



<p></p>



<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2735334721002354"
     crossorigin="anonymous"></script>
<!-- article-horizontal -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-2735334721002354"
     data-ad-slot="8835878737"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>



<p></p>



<pre class="wp-block-code"><code>docker-compose restart</code></pre>



<p>Now we can make API requests to SearXNG enpoints, for more details about API please refer <a href="https://docs.searxng.org/dev/search_api.html" target="_blank" rel="noreferrer noopener">here </a>.</p>



<figure class="wp-block-image size-full"><img loading="lazy" width="960" height="589" src="https://nolowiz.com/wp-content/uploads/2026/02/Searxng-API-call.png" alt="SearXNG API test" class="wp-image-6929" srcset="https://nolowiz.com/wp-content/uploads/2026/02/Searxng-API-call.png 960w, https://nolowiz.com/wp-content/uploads/2026/02/Searxng-API-call-300x184.png 300w, https://nolowiz.com/wp-content/uploads/2026/02/Searxng-API-call-768x471.png 768w, https://nolowiz.com/wp-content/uploads/2026/02/Searxng-API-call-150x92.png 150w" sizes="(max-width: 960px) 100vw, 960px" /></figure>



<h2>Conclusion</h2>



<p>It is easier to setup SearXNGand expose its API endpoints, thanks to docker. <a href="https://nolowiz.com/ollama-api-run-large-language-models-locally-with-simple-apis/" target="_blank" rel="noreferrer noopener">Run Large Language Models Locally with Simple APIs</a></p>
<p><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fnolowiz.com%2Fhow-to-use-searxng-as-a-private-search-api-step-by-step-guide%2F&amp;linkname=How%20to%20use%20SearXNG%20as%20a%20Private%20Search%20API%20%E2%80%93%20Step-by-Step%20Guide" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Fnolowiz.com%2Fhow-to-use-searxng-as-a-private-search-api-step-by-step-guide%2F&amp;linkname=How%20to%20use%20SearXNG%20as%20a%20Private%20Search%20API%20%E2%80%93%20Step-by-Step%20Guide" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fnolowiz.com%2Fhow-to-use-searxng-as-a-private-search-api-step-by-step-guide%2F&amp;linkname=How%20to%20use%20SearXNG%20as%20a%20Private%20Search%20API%20%E2%80%93%20Step-by-Step%20Guide" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Fnolowiz.com%2Fhow-to-use-searxng-as-a-private-search-api-step-by-step-guide%2F&amp;linkname=How%20to%20use%20SearXNG%20as%20a%20Private%20Search%20API%20%E2%80%93%20Step-by-Step%20Guide" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fnolowiz.com%2Fhow-to-use-searxng-as-a-private-search-api-step-by-step-guide%2F&#038;title=How%20to%20use%20SearXNG%20as%20a%20Private%20Search%20API%20%E2%80%93%20Step-by-Step%20Guide" data-a2a-url="https://nolowiz.com/how-to-use-searxng-as-a-private-search-api-step-by-step-guide/" data-a2a-title="How to use SearXNG as a Private Search API – Step-by-Step Guide"></a></p><p>The post <a rel="nofollow" href="https://nolowiz.com/how-to-use-searxng-as-a-private-search-api-step-by-step-guide/">How to use SearXNG as a Private Search API &#8211; Step-by-Step Guide</a> appeared first on <a rel="nofollow" href="https://nolowiz.com">NoloWiz</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Install CUDA Driver on Ubuntu 24.04 LTS or Higher &#8211; A step-by-step guide</title>
		<link>https://nolowiz.com/how-to-install-cuda-driver-on-ubuntu-24-04-lts-or-higher-a-step-by-step-guide/</link>
		
		<dc:creator><![CDATA[Rupesh Sreeraman]]></dc:creator>
		<pubDate>Sat, 29 Nov 2025 05:01:59 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<guid isPermaLink="false">https://nolowiz.com/?p=6735</guid>

					<description><![CDATA[<p>In this tutorial, we will discuss step by step guide to install CUDA driver on Ubuntu 24.04 LTS or higher. We tested this using NVIDIA RTX 3060 12GB GPU on Ubuntu 24.04 LTS. First update the system by running the below commands : We need to disable Nouveau driver,Nouveau is an accelerated open-source graphics driver ... <a title="How to Install CUDA Driver on Ubuntu 24.04 LTS or Higher &#8211; A step-by-step guide" class="read-more" href="https://nolowiz.com/how-to-install-cuda-driver-on-ubuntu-24-04-lts-or-higher-a-step-by-step-guide/" aria-label="More on How to Install CUDA Driver on Ubuntu 24.04 LTS or Higher &#8211; A step-by-step guide">Read more</a></p>
<p>The post <a rel="nofollow" href="https://nolowiz.com/how-to-install-cuda-driver-on-ubuntu-24-04-lts-or-higher-a-step-by-step-guide/">How to Install CUDA Driver on Ubuntu 24.04 LTS or Higher &#8211; A step-by-step guide</a> appeared first on <a rel="nofollow" href="https://nolowiz.com">NoloWiz</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>In this tutorial, we will discuss step by step guide to install CUDA driver on Ubuntu 24.04 LTS or higher. We tested this using <a href="https://www.nvidia.com/en-in/geforce/rtx/" target="_blank" rel="noreferrer noopener">NVIDIA RTX </a>3060 12GB GPU on Ubuntu 24.04 LTS.</p>



<p>First update the system by running the below commands :</p>



<pre class="wp-block-code"><code>sudo apt update
sudo apt upgrade</code></pre>



<p></p>



<script async="" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2735334721002354" crossorigin="anonymous"></script>
<!-- article-horizontal -->
<ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-2735334721002354" data-ad-slot="8835878737" data-ad-format="auto" data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>



<p>We need to disable Nouveau driver,Nouveau is an accelerated open-source graphics driver for NVIDIA GPUs, developed independently by the free software community to provide libre support without relying on NVIDIA&#8217;s proprietary drivers. Disable Nouveau driver by creating a blacklist file:</p>



<pre class="wp-block-code"><code>sudo bash -c "echo -e 'blacklist nouveau\noptions nouveau modeset=0' &gt; /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
sudo update-initramfs -u</code></pre>



<p>Next, reboot the system eithe reboot manually or run the below command :</p>



<pre class="wp-block-code"><code>sudo reboot</code></pre>



<p>Install the prerequisites by running the command :</p>



<pre class="wp-block-code"><code>sudo apt install build-essential libglvnd-dev pkg-config</code></pre>



<p>Add the graphics drivers PPA to get the latest official NVIDIA drivers:</p>



<pre class="wp-block-code"><code>sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update</code></pre>



<p>Check available NVIDIA drivers and install the recommended one:</p>



<pre class="wp-block-code"><code>ubuntu-drivers devices</code></pre>



<figure class="wp-block-image size-full"><img loading="lazy" width="685" height="481" src="https://nolowiz.com/wp-content/uploads/2025/11/image-12.png" alt="" class="wp-image-6738" srcset="https://nolowiz.com/wp-content/uploads/2025/11/image-12.png 685w, https://nolowiz.com/wp-content/uploads/2025/11/image-12-300x211.png 300w, https://nolowiz.com/wp-content/uploads/2025/11/image-12-150x105.png 150w" sizes="(max-width: 685px) 100vw, 685px" /></figure>



<p>Install latest/recommended driver version, I&#8217;m using NVIDIA RTX 3060 graphics card so using the driver nvidia-driver-570  :</p>



<pre class="wp-block-code"><code>sudo apt install nvidia-driver-570</code></pre>



<p></p>



<script async="" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2735334721002354" crossorigin="anonymous"></script>
<!-- article-horizontal -->
<ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-2735334721002354" data-ad-slot="8835878737" data-ad-format="auto" data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>



<p></p>



<p>Alternatively, to auto install the CUDA driver run the below command.</p>



<pre class="wp-block-code"><code>sudo ubuntu-drivers autoinstall</code></pre>



<p>Verify the installation by running the below command :</p>



<pre class="wp-block-code"><code>nvidia-smi</code></pre>



<figure class="wp-block-image size-full"><img loading="lazy" width="933" height="471" src="https://nolowiz.com/wp-content/uploads/2025/11/image-13.png" alt="NVIDIA driver verification" class="wp-image-6758" srcset="https://nolowiz.com/wp-content/uploads/2025/11/image-13.png 933w, https://nolowiz.com/wp-content/uploads/2025/11/image-13-300x151.png 300w, https://nolowiz.com/wp-content/uploads/2025/11/image-13-768x388.png 768w, https://nolowiz.com/wp-content/uploads/2025/11/image-13-150x76.png 150w" sizes="(max-width: 933px) 100vw, 933px" /></figure>



<h2>Conclusion</h2>



<p>By following these simple steps it is easy to install CUDA driver on Ubuntu. Read about <a href="https://nolowiz.com/tp-link-ac1300-archer-t3u-ubuntu-driver-installation-a-step-by-step-guide/" target="_blank" rel="noreferrer noopener">TP-LINK AC1300 Archer T3U Ubuntu Driver Installation&nbsp;</a>.</p>
<p><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fnolowiz.com%2Fhow-to-install-cuda-driver-on-ubuntu-24-04-lts-or-higher-a-step-by-step-guide%2F&amp;linkname=How%20to%20Install%20CUDA%20Driver%20on%20Ubuntu%2024.04%20LTS%20or%20Higher%20%E2%80%93%20A%20step-by-step%20guide" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Fnolowiz.com%2Fhow-to-install-cuda-driver-on-ubuntu-24-04-lts-or-higher-a-step-by-step-guide%2F&amp;linkname=How%20to%20Install%20CUDA%20Driver%20on%20Ubuntu%2024.04%20LTS%20or%20Higher%20%E2%80%93%20A%20step-by-step%20guide" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fnolowiz.com%2Fhow-to-install-cuda-driver-on-ubuntu-24-04-lts-or-higher-a-step-by-step-guide%2F&amp;linkname=How%20to%20Install%20CUDA%20Driver%20on%20Ubuntu%2024.04%20LTS%20or%20Higher%20%E2%80%93%20A%20step-by-step%20guide" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Fnolowiz.com%2Fhow-to-install-cuda-driver-on-ubuntu-24-04-lts-or-higher-a-step-by-step-guide%2F&amp;linkname=How%20to%20Install%20CUDA%20Driver%20on%20Ubuntu%2024.04%20LTS%20or%20Higher%20%E2%80%93%20A%20step-by-step%20guide" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fnolowiz.com%2Fhow-to-install-cuda-driver-on-ubuntu-24-04-lts-or-higher-a-step-by-step-guide%2F&#038;title=How%20to%20Install%20CUDA%20Driver%20on%20Ubuntu%2024.04%20LTS%20or%20Higher%20%E2%80%93%20A%20step-by-step%20guide" data-a2a-url="https://nolowiz.com/how-to-install-cuda-driver-on-ubuntu-24-04-lts-or-higher-a-step-by-step-guide/" data-a2a-title="How to Install CUDA Driver on Ubuntu 24.04 LTS or Higher – A step-by-step guide"></a></p><p>The post <a rel="nofollow" href="https://nolowiz.com/how-to-install-cuda-driver-on-ubuntu-24-04-lts-or-higher-a-step-by-step-guide/">How to Install CUDA Driver on Ubuntu 24.04 LTS or Higher &#8211; A step-by-step guide</a> appeared first on <a rel="nofollow" href="https://nolowiz.com">NoloWiz</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Regression Bug? Learn Git Bisect to Find the Problem Commit</title>
		<link>https://nolowiz.com/regression-bug-learn-git-bisect-to-find-the-problem-commit/</link>
		
		<dc:creator><![CDATA[Rupesh Sreeraman]]></dc:creator>
		<pubDate>Sat, 22 Nov 2025 12:22:15 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<guid isPermaLink="false">https://nolowiz.com/?p=6669</guid>

					<description><![CDATA[<p>In this tutorial we will discuss git bisect to find the commit that caused regression bug. Regression Bug A regression bug is an error that appears in software after a change like a new feature, update, or fix causing previously working functionality to break.It indicates the system has “regressed” in quality. This can happen in ... <a title="Regression Bug? Learn Git Bisect to Find the Problem Commit" class="read-more" href="https://nolowiz.com/regression-bug-learn-git-bisect-to-find-the-problem-commit/" aria-label="More on Regression Bug? Learn Git Bisect to Find the Problem Commit">Read more</a></p>
<p>The post <a rel="nofollow" href="https://nolowiz.com/regression-bug-learn-git-bisect-to-find-the-problem-commit/">Regression Bug? Learn Git Bisect to Find the Problem Commit</a> appeared first on <a rel="nofollow" href="https://nolowiz.com">NoloWiz</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>In this tutorial we will discuss git bisect to find the commit that caused regression bug.</p>



<h2>Regression Bug</h2>



<p>A<strong> </strong>regression bug is an error that appears in software after a change like a new feature, update, or fix causing previously working functionality to break.It indicates the system has “regressed” in quality. This can happen in typical software development.</p>



<p></p>



<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2735334721002354"
     crossorigin="anonymous"></script>
<!-- article-horizontal -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-2735334721002354"
     data-ad-slot="8835878737"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>



<p></p>



<h2>What is Git Bisect?</h2>



<h5>Let&#8217;s understand the problem :</h5>



<p>We know a feature was working before, now it&#8217;s broken. How do we find which commit broke it &#8211; without checking every commit?</p>



<p>The Solution is <a href="https://git-scm.com/docs/git-bisect" target="_blank" rel="noreferrer noopener">git bisect</a>!</p>



<p>Git Bisect helps find the exact commit that introduced a bug using binary search.</p>



<h2>The Core Idea Behind Git Bisect</h2>



<p>Binary Search is a fast way to find something inside a sorted list. Instead of checking items one by one, it splits the list in half each time  reducing search time from O(n) to O(log n).</p>



<p>Let&#8217;s see an example searching for 7 in a sorted list as shown below.</p>



<pre class="wp-block-code"><code>List: &#91;1, 2, 3, 4, 5, 6, 7, 8]

Search for “7”
              ↓
<strong>Step 1</strong> → middle = 4 (not found)
Search right half → &#91;5,6,7,8]

<strong>Step 2</strong> → middle = 6 (not found)
Search right half → &#91;7,8]

<strong>Step 3</strong> → middle = 7 <strong>(FOUND</strong>)</code></pre>



<p>Instead of checking 8 items, it found the answer in just 3 checks.</p>



<p>The same technique is used in git bisect to search for the commit that caused the bug.</p>



<h2>How to use git bisect</h2>



<p>Suppose we have simple calculator app with following commits. (We introduced a bug in commit <strong>57cd4b8 </strong>for this demo)</p>



<figure class="wp-block-image size-full"><img loading="lazy" width="440" height="203" src="https://nolowiz.com/wp-content/uploads/2025/11/image.png" alt="Git commits log" class="wp-image-6678" srcset="https://nolowiz.com/wp-content/uploads/2025/11/image.png 440w, https://nolowiz.com/wp-content/uploads/2025/11/image-300x138.png 300w, https://nolowiz.com/wp-content/uploads/2025/11/image-150x69.png 150w" sizes="(max-width: 440px) 100vw, 440px" /></figure>



<p>The latest code is shown below commit ID : <strong>ac6beeb</strong></p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: python; title: ; notranslate">
def add(a :int, b :int) -&gt; int:
    return a - b

def subtract(a :int, b :int) -&gt; int:
    return a - b    

def multiply(a :int, b :int) -&gt; int:
    return a * b

def divide(a :int, b :int) -&gt; float:
    if b == 0:
        raise ValueError(&quot;Cannot divide by zero.&quot;)
    return a / b

def modulus(a :int, b :int) -&gt; int:
    return a % b

if __name__ == &quot;__main__&quot;:
    result = add(3, 5)
    print(f&quot;The sum of 3 and 5 is: {result}&quot;)
</pre></div>


<p>We can see that add function is wrong when we run the application we will get the below output</p>



<figure class="wp-block-image size-full"><img loading="lazy" width="312" height="60" src="https://nolowiz.com/wp-content/uploads/2025/11/image-1.png" alt="App output" class="wp-image-6681" srcset="https://nolowiz.com/wp-content/uploads/2025/11/image-1.png 312w, https://nolowiz.com/wp-content/uploads/2025/11/image-1-300x58.png 300w, https://nolowiz.com/wp-content/uploads/2025/11/image-1-150x29.png 150w" sizes="(max-width: 312px) 100vw, 312px" /></figure>



<p>Now we have a regression bug, we need to find out the which commit introduced this bug. To finding this bug manually we need to test each commit for the bug, but git bisect will help us to find the buggy commit faster.</p>



<p></p>



<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2735334721002354"
     crossorigin="anonymous"></script>
<!-- article-horizontal -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-2735334721002354"
     data-ad-slot="8835878737"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>



<p></p>



<p>First run the below command to list all the commits with commit IDs.</p>



<pre class="wp-block-code"><code>git log --oneline</code></pre>



<p>Run the below command to start the git bisect process :</p>



<pre class="wp-block-code"><code>git bisect start</code></pre>



<figure class="wp-block-image size-full"><img loading="lazy" width="432" height="54" src="https://nolowiz.com/wp-content/uploads/2025/11/image-2.png" alt="" class="wp-image-6684" srcset="https://nolowiz.com/wp-content/uploads/2025/11/image-2.png 432w, https://nolowiz.com/wp-content/uploads/2025/11/image-2-300x38.png 300w, https://nolowiz.com/wp-content/uploads/2025/11/image-2-150x19.png 150w" sizes="(max-width: 432px) 100vw, 432px" /></figure>



<p>Next we need to give one known good commit where the feature(additon) worked and bad commit. We are going to use use the first commit for this demo (You can give previous good release commit ID)</p>



<pre class="wp-block-code"><code>git bisect good 8714580</code></pre>



<figure class="wp-block-image size-full"><img loading="lazy" width="465" height="52" src="https://nolowiz.com/wp-content/uploads/2025/11/image-3.png" alt="" class="wp-image-6685" srcset="https://nolowiz.com/wp-content/uploads/2025/11/image-3.png 465w, https://nolowiz.com/wp-content/uploads/2025/11/image-3-300x34.png 300w, https://nolowiz.com/wp-content/uploads/2025/11/image-3-150x17.png 150w" sizes="(max-width: 465px) 100vw, 465px" /></figure>



<p>Finally, we need to give a bad commit for this demo Im using latest commit ID <strong>ac6beeb</strong> :</p>



<pre class="wp-block-code"><code>git bisect bad ac6beeb</code></pre>



<figure class="wp-block-image size-full"><img loading="lazy" width="593" height="77" src="https://nolowiz.com/wp-content/uploads/2025/11/image-4.png" alt="" class="wp-image-6686" srcset="https://nolowiz.com/wp-content/uploads/2025/11/image-4.png 593w, https://nolowiz.com/wp-content/uploads/2025/11/image-4-300x39.png 300w, https://nolowiz.com/wp-content/uploads/2025/11/image-4-150x19.png 150w" sizes="(max-width: 593px) 100vw, 593px" /></figure>



<p>From the above logs we can see that bisecting started current commit is &#8220;update readme&#8221;. Let&#8217;s check app output</p>



<figure class="wp-block-image size-full"><img loading="lazy" width="303" height="58" src="https://nolowiz.com/wp-content/uploads/2025/11/image-5.png" alt="" class="wp-image-6687" srcset="https://nolowiz.com/wp-content/uploads/2025/11/image-5.png 303w, https://nolowiz.com/wp-content/uploads/2025/11/image-5-300x57.png 300w, https://nolowiz.com/wp-content/uploads/2025/11/image-5-150x29.png 150w" sizes="(max-width: 303px) 100vw, 303px" /></figure>



<p>It is working fine &#8211; the answser is correct, next we need to mark it as good by running the below command</p>



<pre class="wp-block-code"><code>git bisect good</code></pre>



<figure class="wp-block-image size-full"><img loading="lazy" width="750" height="72" src="https://nolowiz.com/wp-content/uploads/2025/11/image-6.png" alt="" class="wp-image-6689" srcset="https://nolowiz.com/wp-content/uploads/2025/11/image-6.png 750w, https://nolowiz.com/wp-content/uploads/2025/11/image-6-300x29.png 300w, https://nolowiz.com/wp-content/uploads/2025/11/image-6-150x14.png 150w" sizes="(max-width: 750px) 100vw, 750px" /></figure>



<p>We are now moved to another commit that is &#8220;Update readme with supported operations&#8221;, again run the application or run unit tests.</p>



<figure class="wp-block-image size-full"><img loading="lazy" width="293" height="46" src="https://nolowiz.com/wp-content/uploads/2025/11/image-7.png" alt="" class="wp-image-6690" srcset="https://nolowiz.com/wp-content/uploads/2025/11/image-7.png 293w, https://nolowiz.com/wp-content/uploads/2025/11/image-7-150x24.png 150w" sizes="(max-width: 293px) 100vw, 293px" /></figure>



<p>Yes we got bad commit, mark it using the below command.</p>



<pre class="wp-block-code"><code>git bisect bad</code></pre>



<figure class="wp-block-image size-full"><img loading="lazy" width="618" height="70" src="https://nolowiz.com/wp-content/uploads/2025/11/image-8.png" alt="" class="wp-image-6692" srcset="https://nolowiz.com/wp-content/uploads/2025/11/image-8.png 618w, https://nolowiz.com/wp-content/uploads/2025/11/image-8-300x34.png 300w, https://nolowiz.com/wp-content/uploads/2025/11/image-8-150x17.png 150w" sizes="(max-width: 618px) 100vw, 618px" /></figure>



<p>We finally found the commit that caused the bug that is &#8220;Implement multiplication&#8221;, commit ID : 57cd4b8.</p>



<p>Finally , we need to exit git from bisect mode by running the below command</p>



<pre class="wp-block-code"><code>git bisect reset</code></pre>



<figure class="wp-block-image size-full"><img loading="lazy" width="555" height="62" src="https://nolowiz.com/wp-content/uploads/2025/11/image-9.png" alt="" class="wp-image-6702" srcset="https://nolowiz.com/wp-content/uploads/2025/11/image-9.png 555w, https://nolowiz.com/wp-content/uploads/2025/11/image-9-300x34.png 300w, https://nolowiz.com/wp-content/uploads/2025/11/image-9-150x17.png 150w" sizes="(max-width: 555px) 100vw, 555px" /></figure>



<p></p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Learn Git Bisect to Find the Problem Commit #git #gitbisect #tutorial" width="900" height="506" src="https://www.youtube.com/embed/Us6Ztv3bhXY?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<h2>Conclusion</h2>



<p>With Git Bisect, you let Git do the detective work for you &#8211; using the power of binary search to find the exact commit that introduced a bug. It’s fast, reliable, and perfect for regression issues. I hope this tutorial helpful for you. <a href="https://nolowiz.com/git-merge-vs-rebase-whats-the-difference/" target="_blank" rel="noreferrer noopener">Learn the difference between git rebase and git merge</a>.</p>
<p><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fnolowiz.com%2Fregression-bug-learn-git-bisect-to-find-the-problem-commit%2F&amp;linkname=Regression%20Bug%3F%20Learn%20Git%20Bisect%20to%20Find%20the%20Problem%20Commit" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Fnolowiz.com%2Fregression-bug-learn-git-bisect-to-find-the-problem-commit%2F&amp;linkname=Regression%20Bug%3F%20Learn%20Git%20Bisect%20to%20Find%20the%20Problem%20Commit" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fnolowiz.com%2Fregression-bug-learn-git-bisect-to-find-the-problem-commit%2F&amp;linkname=Regression%20Bug%3F%20Learn%20Git%20Bisect%20to%20Find%20the%20Problem%20Commit" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Fnolowiz.com%2Fregression-bug-learn-git-bisect-to-find-the-problem-commit%2F&amp;linkname=Regression%20Bug%3F%20Learn%20Git%20Bisect%20to%20Find%20the%20Problem%20Commit" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fnolowiz.com%2Fregression-bug-learn-git-bisect-to-find-the-problem-commit%2F&#038;title=Regression%20Bug%3F%20Learn%20Git%20Bisect%20to%20Find%20the%20Problem%20Commit" data-a2a-url="https://nolowiz.com/regression-bug-learn-git-bisect-to-find-the-problem-commit/" data-a2a-title="Regression Bug? Learn Git Bisect to Find the Problem Commit"></a></p><p>The post <a rel="nofollow" href="https://nolowiz.com/regression-bug-learn-git-bisect-to-find-the-problem-commit/">Regression Bug? Learn Git Bisect to Find the Problem Commit</a> appeared first on <a rel="nofollow" href="https://nolowiz.com">NoloWiz</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>App-to-App Authentication with Keycloak &#8211; Step by Step Guide</title>
		<link>https://nolowiz.com/app-to-app-authentication-with-keycloak-step-by-step-guide/</link>
		
		<dc:creator><![CDATA[Rupesh Sreeraman]]></dc:creator>
		<pubDate>Sun, 20 Jul 2025 10:22:35 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<guid isPermaLink="false">https://nolowiz.com/?p=6547</guid>

					<description><![CDATA[<p>In this step-by-step guide, we will explore how to set up Keycloak for app-to-app authentication. Project In this demo, we are going to create a project named &#8220;Cool Project&#8221; . It has a FastAPI-based API server and client app. For app-to-app authentication/authorization, we will use the OAuth2 client credentials flow. OAuth 2.0 Client Credentials Flow ... <a title="App-to-App Authentication with Keycloak &#8211; Step by Step Guide" class="read-more" href="https://nolowiz.com/app-to-app-authentication-with-keycloak-step-by-step-guide/" aria-label="More on App-to-App Authentication with Keycloak &#8211; Step by Step Guide">Read more</a></p>
<p>The post <a rel="nofollow" href="https://nolowiz.com/app-to-app-authentication-with-keycloak-step-by-step-guide/">App-to-App Authentication with Keycloak &#8211; Step by Step Guide</a> appeared first on <a rel="nofollow" href="https://nolowiz.com">NoloWiz</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>In this step-by-step guide, we will explore how to set up Keycloak for app-to-app authentication.</p>



<h2>Project</h2>



<p>In this demo, we are going to create a project named &#8220;Cool Project&#8221; . It has a FastAPI-based API server and client app. For app-to-app authentication/authorization, we will use the OAuth2 client credentials flow.</p>



<p><a href="https://datatracker.ietf.org/doc/html/rfc6749#section-4.4" target="_blank" rel="noreferrer noopener">OAuth 2.0 Client Credentials Flow Specification &#8211; RFC 6749</a></p>



<p></p>



<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2735334721002354"
     crossorigin="anonymous"></script>
<!-- article-horizontal -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-2735334721002354"
     data-ad-slot="8835878737"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>



<p></p>



<p>The components of our project are :</p>



<ul><li>Resource server &#8211; FastAPI server</li><li>Client &#8211; Client app ( For the simplicity of this demo, we will use Postman to call the APIs).</li><li>Authorization Server &#8211; Keycloak</li></ul>



<p>We will use the client ID and client secret of the client app to get an access token from the Keycloak authorization server. We will use this access token to call the FastAPI server APIs.</p>



<figure class="wp-block-image size-full"><img loading="lazy" width="964" height="598" src="https://nolowiz.com/wp-content/uploads/2025/07/coolproject-keycloak-app-to-app.png" alt="App to app authentication keycloak system " class="wp-image-6606" srcset="https://nolowiz.com/wp-content/uploads/2025/07/coolproject-keycloak-app-to-app.png 964w, https://nolowiz.com/wp-content/uploads/2025/07/coolproject-keycloak-app-to-app-300x186.png 300w, https://nolowiz.com/wp-content/uploads/2025/07/coolproject-keycloak-app-to-app-768x476.png 768w, https://nolowiz.com/wp-content/uploads/2025/07/coolproject-keycloak-app-to-app-150x93.png 150w" sizes="(max-width: 964px) 100vw, 964px" /></figure>



<h2>Keycloak</h2>



<p>Keycloak&nbsp;is an open-source identity and access management solution that provides single sign-on (SSO), authentication, and authorization for web and mobile applications. It supports modern security protocols like OAuth2 and OpenID Connect, integrates with LDAP and social logins, and offers centralized user management and customization. Keycloak supports the OAuth2 Client Credentials flow, which can be used for app-to-app authentication and authorization.</p>



<h2>Start Keycloak</h2>



<p>First, we need to download Keycloak.</p>



<p>Download the Keycloak zip file from <a href="https://www.keycloak.org/downloads" target="_blank" rel="noreferrer noopener">here</a> and extract the zip file. We are using Keycloak version 26.3.</p>



<p>After extracting the zip, enter the keycloak directory and run the following command in the command prompt:</p>



<pre class="wp-block-code"><code>bin\kc.bat start-dev</code></pre>



<p>Please note that we are running Keycloak in development mode. Open the URL <code>http://localhost:8080/</code>  in a browser. For this demo, we&#8217;re going to create an admin user.</p>



<p>Create an admin user with a username <code>admin</code> and password as <code>adminpass</code> Then log in to Keycloak using the admin user.</p>



<p></p>



<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2735334721002354"
     crossorigin="anonymous"></script>
<!-- article-horizontal -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-2735334721002354"
     data-ad-slot="8835878737"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>



<p></p>



<h2>Create a realm for the project</h2>



<p>Next, we need to create a realm for our project. A<strong> </strong>realm in Keycloak is an isolated security and administrative domain where you manage users, applications, roles, and groups. In simple terms, we can think of it as a project with all the details.. Each realm controls authentication and authorization for its contained resources, ensuring that users and configurations are separated from other realms, enabling multi-tenancy and organized management.</p>



<p>Let&#8217;s create a cool project realm. Click on &#8220;Manage realms&#8221; on the left sidebar and create a realm as shown below.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="645" src="https://nolowiz.com/wp-content/uploads/2025/07/image-1-1024x645.png" alt="Keycloak realm" class="wp-image-6561" srcset="https://nolowiz.com/wp-content/uploads/2025/07/image-1-1024x645.png 1024w, https://nolowiz.com/wp-content/uploads/2025/07/image-1-300x189.png 300w, https://nolowiz.com/wp-content/uploads/2025/07/image-1-768x484.png 768w, https://nolowiz.com/wp-content/uploads/2025/07/image-1-150x94.png 150w, https://nolowiz.com/wp-content/uploads/2025/07/image-1.png 1404w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h2>Create client </h2>



<p>Next, we need to create a client in the coolproject realm.</p>



<figure class="wp-block-image size-full"><img loading="lazy" width="990" height="612" src="https://nolowiz.com/wp-content/uploads/2025/07/image-3.png" alt="Create keycloak client" class="wp-image-6565" srcset="https://nolowiz.com/wp-content/uploads/2025/07/image-3.png 990w, https://nolowiz.com/wp-content/uploads/2025/07/image-3-300x185.png 300w, https://nolowiz.com/wp-content/uploads/2025/07/image-3-768x475.png 768w, https://nolowiz.com/wp-content/uploads/2025/07/image-3-150x93.png 150w" sizes="(max-width: 990px) 100vw, 990px" /></figure>



<p>Click next, and on the next page, we need to turn on &#8220;Client authentication&#8221; and &#8220;Service account roles&#8221; as shown below :</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="605" src="https://nolowiz.com/wp-content/uploads/2025/07/image-4-1024x605.png" alt="Create keycloak client service account" class="wp-image-6566" srcset="https://nolowiz.com/wp-content/uploads/2025/07/image-4-1024x605.png 1024w, https://nolowiz.com/wp-content/uploads/2025/07/image-4-300x177.png 300w, https://nolowiz.com/wp-content/uploads/2025/07/image-4-768x454.png 768w, https://nolowiz.com/wp-content/uploads/2025/07/image-4-150x89.png 150w, https://nolowiz.com/wp-content/uploads/2025/07/image-4.png 1035w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>The above settings enable us to use the OAuth2 client credentials flow.</p>



<p>Click next and leave everything as it is, and click save. Now, click on clients again on the left sidebar, as we can see the newly created client &#8220;client-app&#8221; listed as shown below :</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="630" src="https://nolowiz.com/wp-content/uploads/2025/07/image-5-1024x630.png" alt="Create keycloak clients" class="wp-image-6570" srcset="https://nolowiz.com/wp-content/uploads/2025/07/image-5-1024x630.png 1024w, https://nolowiz.com/wp-content/uploads/2025/07/image-5-300x185.png 300w, https://nolowiz.com/wp-content/uploads/2025/07/image-5-768x473.png 768w, https://nolowiz.com/wp-content/uploads/2025/07/image-5-150x92.png 150w, https://nolowiz.com/wp-content/uploads/2025/07/image-5.png 1206w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h2>Client ID and Client Secret</h2>



<p>In the OAuth2 Client credentials flow, we need the client ID and client secret. </p>



<p>Open the client-app from the left sidebar and we can see that Client ID is &#8220;client-app&#8221; as shown below :</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="404" src="https://nolowiz.com/wp-content/uploads/2025/07/image-6-1024x404.png" alt="Create keycloak client ID" class="wp-image-6573" srcset="https://nolowiz.com/wp-content/uploads/2025/07/image-6-1024x404.png 1024w, https://nolowiz.com/wp-content/uploads/2025/07/image-6-300x118.png 300w, https://nolowiz.com/wp-content/uploads/2025/07/image-6-768x303.png 768w, https://nolowiz.com/wp-content/uploads/2025/07/image-6-150x59.png 150w, https://nolowiz.com/wp-content/uploads/2025/07/image-6.png 1084w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Next, we need the client secret. Click the credentials tab.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="510" src="https://nolowiz.com/wp-content/uploads/2025/07/image-7-1024x510.png" alt="Create keycloak client secret" class="wp-image-6574" srcset="https://nolowiz.com/wp-content/uploads/2025/07/image-7-1024x510.png 1024w, https://nolowiz.com/wp-content/uploads/2025/07/image-7-300x149.png 300w, https://nolowiz.com/wp-content/uploads/2025/07/image-7-768x382.png 768w, https://nolowiz.com/wp-content/uploads/2025/07/image-7-150x75.png 150w, https://nolowiz.com/wp-content/uploads/2025/07/image-7.png 1055w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Open the <a href="http://localhost:8080/realms/coolproject/.well-known/openid-configuration" target="_blank" rel="noreferrer noopener" class="broken_link">http://localhost:8080/realms/coolproject/.well-known/openid-configuration</a> in a browser. We can see the token endpoint as shown below. We will use this URL in Postman to get an access token for the client app.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="346" src="https://nolowiz.com/wp-content/uploads/2025/07/image-8-1024x346.png" alt="Keycloak OpenID endpoints" class="wp-image-6578" srcset="https://nolowiz.com/wp-content/uploads/2025/07/image-8-1024x346.png 1024w, https://nolowiz.com/wp-content/uploads/2025/07/image-8-300x101.png 300w, https://nolowiz.com/wp-content/uploads/2025/07/image-8-768x259.png 768w, https://nolowiz.com/wp-content/uploads/2025/07/image-8-150x51.png 150w, https://nolowiz.com/wp-content/uploads/2025/07/image-8.png 1490w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h2>Add audience claim</h2>



<p>In the Client Credentials flow, there is no user; it&#8217;s an application-to-application (machine-to-machine) authentication. The <a href="https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.3" target="_blank" rel="noreferrer noopener"><code>audience</code> (<code>aud</code>) claim</a> in the access token typically refers to the resource server, that is, the application or API that will receive and validate the token.</p>



<p>We need to add the audience claim to the access token payload. Open clients, then client scopes, and click one <code>client-app-dedicated</code> (a client scope that is ending <code>dedicated</code>).</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="441" src="https://nolowiz.com/wp-content/uploads/2025/07/image-9-1024x441.png" alt="Add audience claim" class="wp-image-6582" srcset="https://nolowiz.com/wp-content/uploads/2025/07/image-9-1024x441.png 1024w, https://nolowiz.com/wp-content/uploads/2025/07/image-9-300x129.png 300w, https://nolowiz.com/wp-content/uploads/2025/07/image-9-768x331.png 768w, https://nolowiz.com/wp-content/uploads/2025/07/image-9-150x65.png 150w, https://nolowiz.com/wp-content/uploads/2025/07/image-9.png 1185w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Then turn off &#8220;Full scope allowed&#8221; (It will remove the default audience &#8220;account&#8221; ) as shown below.</p>



<figure class="wp-block-image size-full"><img loading="lazy" width="561" height="283" src="https://nolowiz.com/wp-content/uploads/2025/07/image-11.png" alt="Disable fullscope " class="wp-image-6584" srcset="https://nolowiz.com/wp-content/uploads/2025/07/image-11.png 561w, https://nolowiz.com/wp-content/uploads/2025/07/image-11-300x151.png 300w, https://nolowiz.com/wp-content/uploads/2025/07/image-11-150x76.png 150w" sizes="(max-width: 561px) 100vw, 561px" /></figure>



<p>Next, we will create a new client scope for the audience with value as the resource server name.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="737" src="https://nolowiz.com/wp-content/uploads/2025/07/image-12-1024x737.png" alt="Add new audience" class="wp-image-6586" srcset="https://nolowiz.com/wp-content/uploads/2025/07/image-12-1024x737.png 1024w, https://nolowiz.com/wp-content/uploads/2025/07/image-12-300x216.png 300w, https://nolowiz.com/wp-content/uploads/2025/07/image-12-768x553.png 768w, https://nolowiz.com/wp-content/uploads/2025/07/image-12-150x108.png 150w, https://nolowiz.com/wp-content/uploads/2025/07/image-12.png 1067w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Open the api-audience client scope and click Mapper, and create a new mapper for Audience. In the &#8220;included Custom Audience&#8221; section, we can give the REST API server name(apiserver). See the screenshots below for reference.</figcaption></figure>



<figure class="wp-block-image size-full"><img loading="lazy" width="652" height="796" src="https://nolowiz.com/wp-content/uploads/2025/07/image-14.png" alt="Add new audience client scope mapper" class="wp-image-6589" srcset="https://nolowiz.com/wp-content/uploads/2025/07/image-14.png 652w, https://nolowiz.com/wp-content/uploads/2025/07/image-14-246x300.png 246w, https://nolowiz.com/wp-content/uploads/2025/07/image-14-150x183.png 150w" sizes="(max-width: 652px) 100vw, 652px" /></figure>



<p>Next, open the client and add the newly created &#8220;api-audience&#8221; scope to the client-app. Open clients and client scopes, add api-audience as shown below:</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="560" src="https://nolowiz.com/wp-content/uploads/2025/07/image-15-1024x560.png" alt="Add audience client scope" class="wp-image-6591" srcset="https://nolowiz.com/wp-content/uploads/2025/07/image-15-1024x560.png 1024w, https://nolowiz.com/wp-content/uploads/2025/07/image-15-300x164.png 300w, https://nolowiz.com/wp-content/uploads/2025/07/image-15-768x420.png 768w, https://nolowiz.com/wp-content/uploads/2025/07/image-15-150x82.png 150w, https://nolowiz.com/wp-content/uploads/2025/07/image-15.png 1111w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Ensure that api-audience assigned type is &#8220;Default&#8221; as shown below.</p>



<figure class="wp-block-image size-full"><img loading="lazy" width="1017" height="757" src="https://nolowiz.com/wp-content/uploads/2025/07/image-16.png" alt="" class="wp-image-6593" srcset="https://nolowiz.com/wp-content/uploads/2025/07/image-16.png 1017w, https://nolowiz.com/wp-content/uploads/2025/07/image-16-300x223.png 300w, https://nolowiz.com/wp-content/uploads/2025/07/image-16-768x572.png 768w, https://nolowiz.com/wp-content/uploads/2025/07/image-16-150x112.png 150w" sizes="(max-width: 1017px) 100vw, 1017px" /></figure>



<p>Now our client app configuration is ready.</p>



<p></p>



<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2735334721002354"
     crossorigin="anonymous"></script>
<!-- article-horizontal -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-2735334721002354"
     data-ad-slot="8835878737"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>



<p></p>



<h2>Start Resource Server</h2>



<p>Next, we need to start the resource server. In this example, we are going to use a simple FastAPI application.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: python; title: ; notranslate">
from fastapi import FastAPI, Depends, HTTPException
from fastapi.security import HTTPBearer, HTTPAuthorizationCredentials
from jose import jwt
import httpx

app = FastAPI()
security = HTTPBearer()


KEYCLOAK_REALM = &quot;coolproject&quot;
KEYCLOAK_URL = &quot;http://localhost:8080&quot;
KEYCLOAK_OPENID_CONFIG = (
    f&quot;{KEYCLOAK_URL}/realms/{KEYCLOAK_REALM}/.well-known/openid-configuration&quot;
)

JWKS = None
from jose.utils import base64url_decode
from cryptography.hazmat.primitives.asymmetric import rsa
from cryptography.hazmat.backends import default_backend


async def verify_token(credentials: HTTPAuthorizationCredentials = Depends(security)):
    token = credentials.credentials
    jwks = await get_public_key()

    try:
        unverified_header = jwt.get_unverified_header(token)
        kid = unverified_header.get(&quot;kid&quot;)
        if not kid:
            raise Exception(&quot;Missing 'kid' in token header&quot;)

        key = next(k for k in jwks&#91;&quot;keys&quot;] if k&#91;&quot;kid&quot;] == kid)

        n = int.from_bytes(base64url_decode(key&#91;&quot;n&quot;].encode()), byteorder=&quot;big&quot;)
        e = int.from_bytes(base64url_decode(key&#91;&quot;e&quot;].encode()), byteorder=&quot;big&quot;)

        public_key = rsa.RSAPublicNumbers(e, n).public_key(default_backend())

        payload = jwt.decode(
            token,
            key=public_key,
            algorithms=&#91;&quot;RS256&quot;],
            audience=&quot;apiserver&quot;,
            issuer=f&quot;{KEYCLOAK_URL}/realms/{KEYCLOAK_REALM}&quot;,
        )
        print(payload)
        return payload

    except Exception as e:
        raise HTTPException(status_code=401, detail=f&quot;Invalid token: {str(e)}&quot;)


async def get_public_key():
    global JWKS
    if JWKS is None:
        async with httpx.AsyncClient() as client:
            r = await client.get(KEYCLOAK_OPENID_CONFIG)
            jwks_uri = r.json()&#91;&quot;jwks_uri&quot;]
            r2 = await client.get(jwks_uri)
            JWKS = r2.json()
    return JWKS


@app.get(&quot;/secure-data&quot;)
async def secure_data(user=Depends(verify_token)):
    return {&quot;message&quot;: &quot;You have access!&quot;, &quot;client&quot;: user&#91;&quot;sub&quot;]}


if __name__ == &quot;__main__&quot;:
    import uvicorn

    uvicorn.run(&quot;app:app&quot;, host=&quot;127.0.0.1&quot;, port=8000, reload=True)

</pre></div>


<p>Create a requirements.txt and install it</p>



<pre class="wp-block-code"><code>fastapi
httpx
python-jose&#91;cryptography]
uvicorn</code></pre>



<p>In the JWT decode, we need to give the audience as the &#8220;apiserver&#8221; that we configured</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: python; title: ; notranslate">
payload = jwt.decode(
            token,
            key=public_key,
            algorithms=&#91;&quot;RS256&quot;],
            audience=&quot;apiserver&quot;,
            issuer=f&quot;{KEYCLOAK_URL}/realms/{KEYCLOAK_REALM}&quot;,
        )
</pre></div>


<p>Start the FastAPI server. Next, we will get an access token using the /token request as shown below :</p>



<figure class="wp-block-image size-full"><img loading="lazy" width="799" height="698" src="https://nolowiz.com/wp-content/uploads/2025/07/image-18.png" alt="Postman token request" class="wp-image-6599" srcset="https://nolowiz.com/wp-content/uploads/2025/07/image-18.png 799w, https://nolowiz.com/wp-content/uploads/2025/07/image-18-300x262.png 300w, https://nolowiz.com/wp-content/uploads/2025/07/image-18-768x671.png 768w, https://nolowiz.com/wp-content/uploads/2025/07/image-18-150x131.png 150w" sizes="(max-width: 799px) 100vw, 799px" /></figure>



<p>Finally, we will use this access token to call the APIs as shown below :</p>



<figure class="wp-block-image size-full"><img loading="lazy" width="764" height="535" src="https://nolowiz.com/wp-content/uploads/2025/07/image-19.png" alt="Postman access resource using access token" class="wp-image-6601" srcset="https://nolowiz.com/wp-content/uploads/2025/07/image-19.png 764w, https://nolowiz.com/wp-content/uploads/2025/07/image-19-300x210.png 300w, https://nolowiz.com/wp-content/uploads/2025/07/image-19-150x105.png 150w" sizes="(max-width: 764px) 100vw, 764px" /></figure>



<p>We can see that the access token payload contains the &#8220;aud&#8221; claim. </p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="212" src="https://nolowiz.com/wp-content/uploads/2025/07/image-20-1024x212.png" alt="Aud claim" class="wp-image-6603" srcset="https://nolowiz.com/wp-content/uploads/2025/07/image-20-1024x212.png 1024w, https://nolowiz.com/wp-content/uploads/2025/07/image-20-300x62.png 300w, https://nolowiz.com/wp-content/uploads/2025/07/image-20-768x159.png 768w, https://nolowiz.com/wp-content/uploads/2025/07/image-20-150x31.png 150w, https://nolowiz.com/wp-content/uploads/2025/07/image-20.png 1082w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h2>Conclusion</h2>



<p>In conclusion, it is easier to set up an authorization server using client credential flow in Keycloak. You can read about <a href="https://nolowiz.com/how-to-serve-llm-using-the-openvino-model-server-on-windows/">How to serve LLM using the OpenVINO Model Server on Windows</a>.</p>
<p><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fnolowiz.com%2Fapp-to-app-authentication-with-keycloak-step-by-step-guide%2F&amp;linkname=App-to-App%20Authentication%20with%20Keycloak%20%E2%80%93%20Step%20by%20Step%20Guide" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Fnolowiz.com%2Fapp-to-app-authentication-with-keycloak-step-by-step-guide%2F&amp;linkname=App-to-App%20Authentication%20with%20Keycloak%20%E2%80%93%20Step%20by%20Step%20Guide" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fnolowiz.com%2Fapp-to-app-authentication-with-keycloak-step-by-step-guide%2F&amp;linkname=App-to-App%20Authentication%20with%20Keycloak%20%E2%80%93%20Step%20by%20Step%20Guide" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Fnolowiz.com%2Fapp-to-app-authentication-with-keycloak-step-by-step-guide%2F&amp;linkname=App-to-App%20Authentication%20with%20Keycloak%20%E2%80%93%20Step%20by%20Step%20Guide" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fnolowiz.com%2Fapp-to-app-authentication-with-keycloak-step-by-step-guide%2F&#038;title=App-to-App%20Authentication%20with%20Keycloak%20%E2%80%93%20Step%20by%20Step%20Guide" data-a2a-url="https://nolowiz.com/app-to-app-authentication-with-keycloak-step-by-step-guide/" data-a2a-title="App-to-App Authentication with Keycloak – Step by Step Guide"></a></p><p>The post <a rel="nofollow" href="https://nolowiz.com/app-to-app-authentication-with-keycloak-step-by-step-guide/">App-to-App Authentication with Keycloak &#8211; Step by Step Guide</a> appeared first on <a rel="nofollow" href="https://nolowiz.com">NoloWiz</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to serve LLM using the OpenVINO Model Server on Windows</title>
		<link>https://nolowiz.com/how-to-serve-llm-using-the-openvino-model-server-on-windows/</link>
		
		<dc:creator><![CDATA[Rupesh Sreeraman]]></dc:creator>
		<pubDate>Tue, 25 Feb 2025 14:41:50 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<guid isPermaLink="false">https://nolowiz.com/?p=6340</guid>

					<description><![CDATA[<p>In this step-by-step guide, we will discuss the deployment of the Large Language Model (LLM) using the OpenVINO model server. This tutorial focuses on the serving of the TinyLlama chat model REST API endpoint using the openVINO model server. We know that OpenVINO is an open-source toolkit by Intel for optimizing and deploying deep learning ... <a title="How to serve LLM using the OpenVINO Model Server on Windows" class="read-more" href="https://nolowiz.com/how-to-serve-llm-using-the-openvino-model-server-on-windows/" aria-label="More on How to serve LLM using the OpenVINO Model Server on Windows">Read more</a></p>
<p>The post <a rel="nofollow" href="https://nolowiz.com/how-to-serve-llm-using-the-openvino-model-server-on-windows/">How to serve LLM using the OpenVINO Model Server on Windows</a> appeared first on <a rel="nofollow" href="https://nolowiz.com">NoloWiz</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>In this step-by-step guide, we will discuss the deployment of the Large Language Model (LLM) using the OpenVINO model server. This tutorial focuses on the serving of the TinyLlama chat model REST API endpoint using the openVINO model server. </p>



<p>We know that <a href="https://github.com/openvinotoolkit/openvino" target="_blank" rel="noreferrer noopener">OpenVINO </a>is an open-source toolkit by <a href="https://www.intel.com/content/www/us/en/homepage.html" target="_blank" rel="noreferrer noopener" class="broken_link">Intel </a>for optimizing and deploying deep learning models. It enhances model performance on Intel hardware, supports frameworks like PyTorch and TensorFlow, and offers tools for efficient inference across multiple platforms, including CPUs, GPUs, NPUs and VPUs.</p>



<p>Ensure the following dependencies are available on your Windows 11 machine :</p>



<ul><li>Python 3.11 or higher</li><li>git</li><li>curl (optional)</li></ul>



<p></p>



<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2735334721002354"
     crossorigin="anonymous"></script>
<!-- article-horizontal -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-2735334721002354"
     data-ad-slot="8835878737"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>



<h2>Model Conversion</h2>



<p>We need to convert the model LLM model to OpenVINO. Create a folder and a Python virtual environment, for that open command prompt and run the below commands : </p>



<pre class="wp-block-code"><code>mkdir model_converter
cd model_converter
python -m venv env
env\Scripts\activate</code></pre>



<p>Next, install the dependencies by running the below command : </p>



<pre class="wp-block-code"><code>pip install -r https://raw.githubusercontent.com/openvinotoolkit/model_server/refs/heads/main/demos/common/export_models/requirements.txt</code></pre>



<p>Then download the <a href="https://raw.githubusercontent.com/openvinotoolkit/model_server/refs/heads/main/demos/common/export_models/export_model.py" target="_blank" rel="noreferrer noopener">export_model.py</a> file to &#8220;model_converter&#8221; folder or use the below command :</p>



<pre class="wp-block-code"><code>curl https://raw.githubusercontent.com/openvinotoolkit/model_server/refs/heads/main/demos/common/export_models/export_model.py  --ssl-no-revoke -o export_model.py</code></pre>



<p>Create a folder named &#8220;models&#8221; by running the below command :</p>



<pre class="wp-block-code"><code>mkdir models</code></pre>



<p>Next, we need to convert the <a href="https://huggingface.co/TinyLlama/TinyLlama-1.1B-Chat-v1.0" target="_blank" rel="noreferrer noopener">TinyLlama-1.1B-Chat-v1.0</a> model to OpenVINO using the below command :</p>



<pre class="wp-block-code"><code>python export_model.py text_generation --source_model TinyLlama/TinyLlama-1.1B-Chat-v1.0 --weight-format int4 --config_file_path models/config.json --model_repository_path models </code></pre>



<p></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="505" src="https://nolowiz.com/wp-content/uploads/2025/02/openvino_model_conversion-1024x505.png" alt="OpenVINO model conversion for OVMS" class="wp-image-6358" srcset="https://nolowiz.com/wp-content/uploads/2025/02/openvino_model_conversion-1024x505.png 1024w, https://nolowiz.com/wp-content/uploads/2025/02/openvino_model_conversion-300x148.png 300w, https://nolowiz.com/wp-content/uploads/2025/02/openvino_model_conversion-768x379.png 768w, https://nolowiz.com/wp-content/uploads/2025/02/openvino_model_conversion-150x74.png 150w, https://nolowiz.com/wp-content/uploads/2025/02/openvino_model_conversion.png 1032w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>After conversion, the OpenVINO TinyLlama model is available in the &#8220;models&#8221; directory. We need the full path of &#8220;config.json&#8221; to serve the model with the OpenVINO model server. The converted OpenVINO model weights are int4 quantized.</p>



<figure class="wp-block-image size-full"><img loading="lazy" width="652" height="112" src="https://nolowiz.com/wp-content/uploads/2025/02/image-1.png" alt="" class="wp-image-6365" srcset="https://nolowiz.com/wp-content/uploads/2025/02/image-1.png 652w, https://nolowiz.com/wp-content/uploads/2025/02/image-1-300x52.png 300w, https://nolowiz.com/wp-content/uploads/2025/02/image-1-150x26.png 150w" sizes="(max-width: 652px) 100vw, 652px" /></figure>



<h2>Deploy model with OpenVINO Model Server</h2>



<p><a href="https://github.com/openvinotoolkit/model_server" target="_blank" rel="noreferrer noopener">OpenVINO Model Server</a> is a high-performance system for serving optimized machine learning models over standard network protocols like REST and <a href="https://grpc.io/" target="_blank" rel="noreferrer noopener">gRPC</a>. Built with C++ and optimized for Intel hardware, it leverages the OpenVINO toolkit for accelerated inference. OVMS offers gRPC and REST APIs, compatible with TensorFlow Serving and KServe, simplifying integration. It supports diverse frameworks and model formats, enabling scalable and efficient deployment for AI applications like image recognition and NLP. OVMS is open-source, flexible, and designed for production environments.</p>



<p>Download the OpenVINO model server for Windows from the GitHub releases page <a href="https://github.com/openvinotoolkit/model_server/releases/download/v2025.0/ovms_windows.zip" target="_blank" rel="noreferrer noopener">here </a>. We are using OpenVINO<img src="https://s.w.org/images/core/emoji/13.1.0/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Model Server 2025.0 for this tutorial, extract the zip(ovms_windows.zip) file.</p>



<p>Open the command prompt enter into the &#8220;ovms_windows&#8221; folder and run the below commands:</p>



<pre class="wp-block-code"><code>setupvars.bat</code></pre>



<figure class="wp-block-image size-full"><img loading="lazy" width="462" height="116" src="https://nolowiz.com/wp-content/uploads/2025/02/image.png" alt="OVMS setup" class="wp-image-6362" srcset="https://nolowiz.com/wp-content/uploads/2025/02/image.png 462w, https://nolowiz.com/wp-content/uploads/2025/02/image-300x75.png 300w, https://nolowiz.com/wp-content/uploads/2025/02/image-150x38.png 150w" sizes="(max-width: 462px) 100vw, 462px" /></figure>



<p>Next, we can start the OVMS to serve our model by running the below command :</p>



<pre class="wp-block-code"><code>ovms --config_path "&lt;&lt;Your converted models config.js path&gt;&gt;"  --rest_port 8000</code></pre>



<p>Now the OVMS running at http://localhost:8000. Verify model serving is ok by requesting the API endpoint<strong> http://localhost:8000/v1/config</strong></p>



<figure class="wp-block-image size-full"><img loading="lazy" width="509" height="307" src="https://nolowiz.com/wp-content/uploads/2025/02/curl_ovms_output.png" alt="OVMS API configuration" class="wp-image-6367" srcset="https://nolowiz.com/wp-content/uploads/2025/02/curl_ovms_output.png 509w, https://nolowiz.com/wp-content/uploads/2025/02/curl_ovms_output-300x181.png 300w, https://nolowiz.com/wp-content/uploads/2025/02/curl_ovms_output-150x90.png 150w" sizes="(max-width: 509px) 100vw, 509px" /></figure>



<p>As we can see that model is available since the state is &#8220;available&#8221; in the above API response.</p>



<p></p>



<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2735334721002354"
     crossorigin="anonymous"></script>
<!-- article-horizontal -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-2735334721002354"
     data-ad-slot="8835878737"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>



<p></p>



<h2>Use LLM</h2>



<p>OpenVINO model server provides chat completions API endpoint similar to OpenAI.The chat completion endpoint of OVMS is :</p>



<pre class="wp-block-code"><code>http:&#47;&#47;localhost:8000/v3/chat/completions</code></pre>



<p>Install OpenAI package:</p>



<pre class="wp-block-code"><code>pip install openai</code></pre>



<p>We can test the LLM using the below code :</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: python; title: ; notranslate">
from openai import OpenAI

client = OpenAI(
  base_url=&quot;http://localhost:8000/v3&quot;,
  api_key=&quot;unused&quot;
)

stream = client.chat.completions.create(
    model=&quot;TinyLlama/TinyLlama-1.1B-Chat-v1.0&quot;,
    messages=&#91;{&quot;role&quot;: &quot;user&quot;, &quot;content&quot;: &quot;What is opencv?&quot;}],
    stream=True,
    temperature=0.1,
)
for chunk in stream:
    if chunk.choices&#91;0].delta.content is not None:
        print(chunk.choices&#91;0].delta.content, end=&quot;&quot;, flush=True)
</pre></div>


<p><strong>Output</strong></p>



<figure class="wp-block-image size-full"><img loading="lazy" width="697" height="114" src="https://nolowiz.com/wp-content/uploads/2025/02/image-3.png" alt="" class="wp-image-6374" srcset="https://nolowiz.com/wp-content/uploads/2025/02/image-3.png 697w, https://nolowiz.com/wp-content/uploads/2025/02/image-3-300x49.png 300w, https://nolowiz.com/wp-content/uploads/2025/02/image-3-150x25.png 150w" sizes="(max-width: 697px) 100vw, 697px" /></figure>



<h2>Conclusion</h2>



<p>In short, deploying your LLM model on Windows is simplified with the OpenVINO model server. Just remember to convert your chosen model with the appropriate quantization for optimal performance.</p>
<p><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fnolowiz.com%2Fhow-to-serve-llm-using-the-openvino-model-server-on-windows%2F&amp;linkname=How%20to%20serve%20LLM%20using%20the%20OpenVINO%20Model%20Server%20on%20Windows" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Fnolowiz.com%2Fhow-to-serve-llm-using-the-openvino-model-server-on-windows%2F&amp;linkname=How%20to%20serve%20LLM%20using%20the%20OpenVINO%20Model%20Server%20on%20Windows" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fnolowiz.com%2Fhow-to-serve-llm-using-the-openvino-model-server-on-windows%2F&amp;linkname=How%20to%20serve%20LLM%20using%20the%20OpenVINO%20Model%20Server%20on%20Windows" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Fnolowiz.com%2Fhow-to-serve-llm-using-the-openvino-model-server-on-windows%2F&amp;linkname=How%20to%20serve%20LLM%20using%20the%20OpenVINO%20Model%20Server%20on%20Windows" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fnolowiz.com%2Fhow-to-serve-llm-using-the-openvino-model-server-on-windows%2F&#038;title=How%20to%20serve%20LLM%20using%20the%20OpenVINO%20Model%20Server%20on%20Windows" data-a2a-url="https://nolowiz.com/how-to-serve-llm-using-the-openvino-model-server-on-windows/" data-a2a-title="How to serve LLM using the OpenVINO Model Server on Windows"></a></p><p>The post <a rel="nofollow" href="https://nolowiz.com/how-to-serve-llm-using-the-openvino-model-server-on-windows/">How to serve LLM using the OpenVINO Model Server on Windows</a> appeared first on <a rel="nofollow" href="https://nolowiz.com">NoloWiz</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to use ComfyUI with FastSDCPU and OpenVINO</title>
		<link>https://nolowiz.com/how-to-use-comfyui-with-fastsdcpu-and-openvino/</link>
		
		<dc:creator><![CDATA[Rupesh Sreeraman]]></dc:creator>
		<pubDate>Thu, 26 Dec 2024 07:04:24 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<guid isPermaLink="false">https://nolowiz.com/?p=6310</guid>

					<description><![CDATA[<p>This tutorial will discuss how to use FastSD webserver with ComfyUI. FastSDCPU is a faster version of a stable diffusion application running on a CPU, based on OpenVINO and Pytorch implementations. Step 1: Download and Install FastSDCPU In this demo, we are using a Windows 11 machine to test, first download FastSD CPU release. Extract ... <a title="How to use ComfyUI with FastSDCPU and OpenVINO" class="read-more" href="https://nolowiz.com/how-to-use-comfyui-with-fastsdcpu-and-openvino/" aria-label="More on How to use ComfyUI with FastSDCPU and OpenVINO">Read more</a></p>
<p>The post <a rel="nofollow" href="https://nolowiz.com/how-to-use-comfyui-with-fastsdcpu-and-openvino/">How to use ComfyUI with FastSDCPU and OpenVINO</a> appeared first on <a rel="nofollow" href="https://nolowiz.com">NoloWiz</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>This tutorial will discuss how to use FastSD webserver with ComfyUI. FastSDCPU is a faster version of a stable diffusion application running on a CPU, based on OpenVINO and Pytorch implementations.</p>



<h2>Step 1: Download and Install FastSDCPU</h2>



<p>In this demo, we are using a Windows 11 machine to test, first download <a href="https://github.com/rupeshs/fastsdcpu/releases" target="_blank" rel="noreferrer noopener">FastSD CPU release</a>. Extract the zip file and install it by following the steps :</p>



<ul><li>You need to install <a href="https://www.python.org/">Python 3</a> and <a href="https://docs.astral.sh/uv/#highlights" target="_blank" rel="noreferrer noopener">uv </a>&#8211; fast package manager for python.</li><li>Double click&nbsp;<code>install.bat</code>&nbsp;(It will take some time to install, depending on your internet speed.)</li><li>After the installation close this command prompt window</li><li>Double click the<code> start-webserver.bat</code> file to start FastSD CPU in webserver mode</li></ul>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="504" src="https://nolowiz.com/wp-content/uploads/2024/12/image-1-1024x504.png" alt="" class="wp-image-6326" srcset="https://nolowiz.com/wp-content/uploads/2024/12/image-1-1024x504.png 1024w, https://nolowiz.com/wp-content/uploads/2024/12/image-1-300x148.png 300w, https://nolowiz.com/wp-content/uploads/2024/12/image-1-768x378.png 768w, https://nolowiz.com/wp-content/uploads/2024/12/image-1-150x74.png 150w, https://nolowiz.com/wp-content/uploads/2024/12/image-1.png 1095w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p></p>



<script async="" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2735334721002354" crossorigin="anonymous"></script>
<!-- article-horizontal -->
<ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-2735334721002354" data-ad-slot="8835878737" data-ad-format="auto" data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>



<p></p>



<h2>Step 2: Download and Install ComfyUI</h2>



<p>Next, we will download ComfyUI from this official<a href="https://github.com/comfyanonymous/ComfyUI/releases/download/v0.3.9/ComfyUI_windows_portable_nvidia.7z" target="_blank" rel="noreferrer noopener"> repo</a> and extract the zip file. </p>



<h2>Step 3: Install ComfyUI extensions</h2>



<p>Enter into <code>ComfyUI_windows_portable\ComfyUI\custom_nodes</code> folder and clone the following extensions :</p>



<ul><li><a href="https://github.com/rupeshs/ComfyUI-FastSDCPU" target="_blank" rel="noreferrer noopener">rupeshs/ComfyUI-FastSDCPU</a></li><li><a href="https://github.com/pythongosssss/ComfyUI-Custom-Scripts">pythongosssss/ComfyUI-Custom-Scripts</a></li></ul>



<p>Run the following command to install extensions:</p>



<pre class="wp-block-code"><code>git clone https://github.com/pythongosssss/ComfyUI-Custom-Scripts.git
git clone https://github.com/BetaDoggo/ComfyUI-FastSDCPU</code></pre>



<h2>Step 4:  Faster generation of images using OpenVINO</h2>



<p><a href="https://www.intel.com/content/www/us/en/developer/tools/openvino-toolkit/overview.html" target="_blank" rel="noreferrer noopener">OpenVINO</a>&nbsp;(<strong>Open</strong>&nbsp;<strong>V</strong>isual&nbsp;<strong>I</strong>nference and&nbsp;<strong>N</strong>eural Network&nbsp;<strong>O</strong>ptimization) is an open-source toolkit for optimizing and deploying deep learning models on Intel hardware, including CPUs, GPUs, NPUs, VPUs, and FPGAs.&nbsp;FastSD uses OpenVINO to improve inference speeds on CPU and <a href="https://nolowiz.com/ai-pc-and-openvino-quick-and-simple-guide/" target="_blank" rel="noreferrer noopener">AIPCs</a>.</p>



<p>Next, we can start comfyUI by double-clicking <code>run_cpu.bat</code> file. </p>



<p></p>



<script async="" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2735334721002354" crossorigin="anonymous"></script>
<!-- article-horizontal -->
<ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-2735334721002354" data-ad-slot="8835878737" data-ad-format="auto" data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>



<p></p>



<p>Open the FastSD ComfyUI extension<a href="https://github.com/BetaDoggo/ComfyUI-FastSDCPU" target="_blank" rel="noreferrer noopener"> page</a> and drag and drop the first image to your ComfyUi running at http://127.0.0.1:8188/</p>



<p>Write a prompt, select the model <code>rupeshs/sd-turbo-openvino</code> , and run. (if you get a NAN error change <code>token_merging</code> value to 0)</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="555" src="https://nolowiz.com/wp-content/uploads/2024/12/comfyi_fastsdcpu_openvino-1024x555.png" alt="" class="wp-image-6321" srcset="https://nolowiz.com/wp-content/uploads/2024/12/comfyi_fastsdcpu_openvino-1024x555.png 1024w, https://nolowiz.com/wp-content/uploads/2024/12/comfyi_fastsdcpu_openvino-300x163.png 300w, https://nolowiz.com/wp-content/uploads/2024/12/comfyi_fastsdcpu_openvino-768x417.png 768w, https://nolowiz.com/wp-content/uploads/2024/12/comfyi_fastsdcpu_openvino-150x81.png 150w, https://nolowiz.com/wp-content/uploads/2024/12/comfyi_fastsdcpu_openvino.png 1464w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="How to use ComfyUI with FastSDCPU #cpu #comfyui #fastsdcpu #ai" width="900" height="506" src="https://www.youtube.com/embed/UAXGjpEtnQI?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>
<p><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fnolowiz.com%2Fhow-to-use-comfyui-with-fastsdcpu-and-openvino%2F&amp;linkname=How%20to%20use%20ComfyUI%20with%20FastSDCPU%20and%20OpenVINO" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Fnolowiz.com%2Fhow-to-use-comfyui-with-fastsdcpu-and-openvino%2F&amp;linkname=How%20to%20use%20ComfyUI%20with%20FastSDCPU%20and%20OpenVINO" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fnolowiz.com%2Fhow-to-use-comfyui-with-fastsdcpu-and-openvino%2F&amp;linkname=How%20to%20use%20ComfyUI%20with%20FastSDCPU%20and%20OpenVINO" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Fnolowiz.com%2Fhow-to-use-comfyui-with-fastsdcpu-and-openvino%2F&amp;linkname=How%20to%20use%20ComfyUI%20with%20FastSDCPU%20and%20OpenVINO" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fnolowiz.com%2Fhow-to-use-comfyui-with-fastsdcpu-and-openvino%2F&#038;title=How%20to%20use%20ComfyUI%20with%20FastSDCPU%20and%20OpenVINO" data-a2a-url="https://nolowiz.com/how-to-use-comfyui-with-fastsdcpu-and-openvino/" data-a2a-title="How to use ComfyUI with FastSDCPU and OpenVINO"></a></p><p>The post <a rel="nofollow" href="https://nolowiz.com/how-to-use-comfyui-with-fastsdcpu-and-openvino/">How to use ComfyUI with FastSDCPU and OpenVINO</a> appeared first on <a rel="nofollow" href="https://nolowiz.com">NoloWiz</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Short-Circuiting in Python</title>
		<link>https://nolowiz.com/short-circuiting-in-python/</link>
		
		<dc:creator><![CDATA[Rupesh Sreeraman]]></dc:creator>
		<pubDate>Tue, 20 Aug 2024 15:44:22 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<guid isPermaLink="false">https://nolowiz.com/?p=6188</guid>

					<description><![CDATA[<p>In this article, we will discuss the short-circuiting technique in Python programming. What is Short Circuiting? Short-circuiting is a technique many programming languages use when evaluating boolean logic expressions to save computing power by skipping unnecessary parts of the expression. Python provides 2 short-circuit operators : or and The or Operator Python evaluates the left-hand ... <a title="Short-Circuiting in Python" class="read-more" href="https://nolowiz.com/short-circuiting-in-python/" aria-label="More on Short-Circuiting in Python">Read more</a></p>
<p>The post <a rel="nofollow" href="https://nolowiz.com/short-circuiting-in-python/">Short-Circuiting in Python</a> appeared first on <a rel="nofollow" href="https://nolowiz.com">NoloWiz</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>In this article, we will discuss the short-circuiting technique in Python programming.</p>



<h2>What is Short Circuiting?</h2>



<p>Short-circuiting is a technique many programming languages use when evaluating boolean logic expressions to save computing power by skipping unnecessary parts of the expression.</p>



<p>Python provides 2 short-circuit operators :</p>



<ul><li>or</li><li>and</li></ul>



<h3>The or Operator</h3>



<p>Python evaluates the left-hand side of the <code>or</code> expression first. If it is <code>True</code>, Python doesn&#8217;t evaluate the right-hand side because the entire expression will be <code>True</code> regardless of the right-hand side.</p>



<pre class="wp-block-code"><code> 50 &gt; 20 or 0 &gt; 1</code></pre>



<p>Here, the first expression starting from left 50&gt;20   is true. So Python will skip evaluating expressions on the right-hand side (0&gt;1).</p>



<p>Another example :</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: python; title: ; notranslate">
a = True
b = False
result = a or b  # Python only evaluates `a`, and the result is `True`
</pre></div>


<p>This avoids unnecessary computation on the right-hand side of the &#8220;or&#8221; operator.</p>



<p></p>



<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2735334721002354"
     crossorigin="anonymous"></script>
<!-- article-horizontal -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-2735334721002354"
     data-ad-slot="8835878737"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>



<p></p>



<h3>The and Operator</h3>



<p>For &#8220;and&#8221; operator, If the left-hand side expression is <code>False</code>, Python doesn&#8217;t evaluate the right-hand side because the entire expression will be <code>False</code> regardless of the right-hand side.</p>



<p>Let&#8217;s check the below example :</p>



<pre class="wp-block-code"><code>
1 &gt; 20 and 30 &gt; 4
</code></pre>



<p>The left-hand side expression( 1&gt;20)  is <code>False</code> so Python will skip evaluating right-hand side expressions.</p>



<h2>How can we confirm that short-circuiting is skipping the computation?</h2>



<p>The expression 1/0 raises an error(Division by zero) as shown below:</p>



<figure class="wp-block-image size-full"><img loading="lazy" width="380" height="86" src="https://nolowiz.com/wp-content/uploads/2024/08/image.png" alt="zero by division error" class="wp-image-6196" srcset="https://nolowiz.com/wp-content/uploads/2024/08/image.png 380w, https://nolowiz.com/wp-content/uploads/2024/08/image-300x68.png 300w, https://nolowiz.com/wp-content/uploads/2024/08/image-150x34.png 150w" sizes="(max-width: 380px) 100vw, 380px" /></figure>



<figure class="wp-block-image size-full"><img loading="lazy" width="199" height="61" src="https://nolowiz.com/wp-content/uploads/2024/08/image-1.png" alt="and short circuiting example in python" class="wp-image-6197" srcset="https://nolowiz.com/wp-content/uploads/2024/08/image-1.png 199w, https://nolowiz.com/wp-content/uploads/2024/08/image-1-150x46.png 150w" sizes="(max-width: 199px) 100vw, 199px" /></figure>



<p>Python skips the 1/0 expression evaluation since 1&gt;20 is False.</p>



<p>Similarly, we can confirm <strong>or</strong> operator short-circuiting too.</p>



<figure class="wp-block-image size-full"><img loading="lazy" width="176" height="44" src="https://nolowiz.com/wp-content/uploads/2024/08/image-2.png" alt="" class="wp-image-6198" srcset="https://nolowiz.com/wp-content/uploads/2024/08/image-2.png 176w, https://nolowiz.com/wp-content/uploads/2024/08/image-2-150x38.png 150w" sizes="(max-width: 176px) 100vw, 176px" /></figure>



<p>Here also division by zero is not raised because 1/0 is not evaluated.</p>



<p></p>



<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2735334721002354"
     crossorigin="anonymous"></script>
<!-- article-horizontal -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-2735334721002354"
     data-ad-slot="8835878737"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>



<p></p>



<h2>Advantages of Short Circuiting in Python</h2>



<h3>1. Avoiding errors</h3>



<p>Short-circuiting can help avoid errors by skipping unnecessary evaluations.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: python; title: ; notranslate">
user = {'name': 'John', 'age': 30}
if user and user&#91;'address']:
    print(user&#91;'address']&#91;'city'])
</pre></div>


<p>If user is None, accessing user[&#8216;address&#8217;] would raise an error. But with short circuiting, the second part is only evaluated if user is true(Not None), preventing the error.</p>



<h3>2.&nbsp;Improving Performance</h3>



<p>Short-circuiting can improve performance by avoiding unnecessary computation..</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: python; title: ; notranslate">
if is_even(num) and is_prime(num):
    print(&quot;Number is both even and prime&quot;)
</pre></div>


<p>If num is odd, checking if it&#8217;s prime is unnecessary, so short circuiting skips it.</p>



<h3>3.&nbsp;Concise Conditional Logic</h3>



<p>Short circuiting allows writing concise conditional logic. For example:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: python; title: ; notranslate">
is_loaded = True
content = is_loaded and get_content()
</pre></div>


<p>If is_loaded is False, get_content() is never called, but content is still assigned False.</p>



<h3>4.&nbsp;Assigning Default Values</h3>



<p>Short circuiting is commonly used to assign default values:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: python; title: ; notranslate">
user_name = user.get('name') or 'Anonymous'
</pre></div>


<p>If user.get(&#8216;name&#8217;) returns None, user_name is assigned the default value &#8216;Anonymous&#8217;.</p>



<h2>Conclusion</h2>



<p>In summary, short circuiting in Python provides a way to write efficient, concise, and error-resistant code by skipping unnecessary computations based on the result of earlier parts of a boolean expression.</p>
<p><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fnolowiz.com%2Fshort-circuiting-in-python%2F&amp;linkname=Short-Circuiting%20in%20Python" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Fnolowiz.com%2Fshort-circuiting-in-python%2F&amp;linkname=Short-Circuiting%20in%20Python" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fnolowiz.com%2Fshort-circuiting-in-python%2F&amp;linkname=Short-Circuiting%20in%20Python" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Fnolowiz.com%2Fshort-circuiting-in-python%2F&amp;linkname=Short-Circuiting%20in%20Python" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fnolowiz.com%2Fshort-circuiting-in-python%2F&#038;title=Short-Circuiting%20in%20Python" data-a2a-url="https://nolowiz.com/short-circuiting-in-python/" data-a2a-title="Short-Circuiting in Python"></a></p><p>The post <a rel="nofollow" href="https://nolowiz.com/short-circuiting-in-python/">Short-Circuiting in Python</a> appeared first on <a rel="nofollow" href="https://nolowiz.com">NoloWiz</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
