<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Avnish</title>
    <description>The latest articles on Forem by Avnish (@bovem).</description>
    <link>https://forem.com/bovem</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F95106%2F31e98097-dfc0-4334-b518-0731e0a00ab4.png</url>
      <title>Forem: Avnish</title>
      <link>https://forem.com/bovem</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/bovem"/>
    <language>en</language>
    <item>
      <title>Containers</title>
      <dc:creator>Avnish</dc:creator>
      <pubDate>Thu, 25 May 2023 14:53:51 +0000</pubDate>
      <link>https://forem.com/bovem/containers-2jch</link>
      <guid>https://forem.com/bovem/containers-2jch</guid>
      <description>&lt;p&gt;While creating an application in any programming language or framework you have to install its dependencies on your system.&lt;br&gt;
This could include the compiler for the programming language, libraries, and frameworks. &lt;/p&gt;

&lt;p&gt;If the environment for the deployment of this application is different then the whole process of dependency installation has to repeat. You might have to some other changes, like setting up environment variables and making changes to the configuration files.&lt;/p&gt;

&lt;p&gt;This problem becomes more challenging once you start collaborating with other people. The complete installation process has to be repeated on every development machine. Even if complete documentation of the setup process is available the developers could have a different environment. It is also possible that the developers want to work on two different projects simultaneously and there could be a conflict between their configurations (like different versions of the framework).&lt;/p&gt;

&lt;p&gt;When an application is deployed directly on the OS running on the physical hardware it is called &lt;strong&gt;baremetal deployment&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CO224lqP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xkz65g8ctnjrbhmxo7qc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CO224lqP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xkz65g8ctnjrbhmxo7qc.png" alt="Baremetal Deployment" width="391" height="311"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Virtual Machines (VMs)
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;virtual machine&lt;/strong&gt; as the name suggests is a machine running upon the OS installed on the physical hardware. It has its virtual CPU, memory, networking interfaces, and other resources that are provided by a &lt;em&gt;hypervisor&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;hypervisor&lt;/strong&gt; is a program that is used to create and manage virtual machines. Some common hypervisors are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Oracle VM VirtualBox&lt;/li&gt;
&lt;li&gt;Hyper-V&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Advantages of using VMs for deploying applications
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ppRK6j3U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ot9pccpu00qdnkrh43kq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ppRK6j3U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ot9pccpu00qdnkrh43kq.png" alt="Virtualized Deployment" width="411" height="521"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, what advantage does development over VMs provide over development on the OS deployed on the physical hardware?&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The environment is persistent across the machines.
If you create your application's development environment inside a VM, then you can share it with anyone else who is interested to run it themselves.
The environment will be the same irrespective of the OS installed on the physical hardware.&lt;/li&gt;
&lt;li&gt;Load balancing is easier in the production environment.
You can run multiple instances of the same application such that the load could be distributed effectively. If one of the instances is down (due to updates or outage) the traffic to it could be re-routed to another instance.&lt;/li&gt;
&lt;li&gt;Effective distribution of physical hardware resources available.
The hypervisor creates a pool of resources available to it from the OS. Then these resources could be effectively distributed among the VMs created. A deployment VM could use fewer resources compared to a development VM.&lt;/li&gt;
&lt;li&gt;Provides an option to run multiple OS on a single hardware.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Containers
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;container&lt;/strong&gt; is a set of one or more isolated processes running on an OS, it could be on a VM or directly on the physical hardware. Usually, it requires fewer resources than a virtual machine and provides similar performance and benefits depending on your use case.  &lt;/p&gt;

&lt;p&gt;The workloads running inside a container have very limited exposure to the resources of its host i.e its CPUs, memory, network, and storage. It uses the same kernel as its host, that's why you can't spin up a Linux container on a machine running Windows (without provisioning the VM through Windows Subsystem for Linux or any other hypervisor).&lt;/p&gt;

&lt;h2&gt;
  
  
  Advantages of using Containers over Virtual Machines
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SkJRagqX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rtm3e4ip2kdzo93lkcdo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SkJRagqX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rtm3e4ip2kdzo93lkcdo.png" alt="Containerized Deployment" width="411" height="461"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Relatively lighter compared to VMs
Containers don't need virtual resources. The size of the container could be shrunk down to the point where only the dependencies required for the application are present on it.&lt;/li&gt;
&lt;li&gt;Faster deployment
Due to their smaller size compared to VMs they could be deployed faster.&lt;/li&gt;
&lt;li&gt;More scalable
It is possible to execute multiple containers in the same amount of resources required by a VM for an application.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Depending on your use case the deployment could be a mix of both virtualization and containerization. Like a service comprising of multiple containers could be deployed on a VM.&lt;/p&gt;

&lt;h2&gt;
  
  
  Managing Containers
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Container Runtime
&lt;/h2&gt;

&lt;p&gt;The container is executed through a &lt;strong&gt;container runtime&lt;/strong&gt;. It sets up the namespaces for the container.&lt;/p&gt;

&lt;p&gt;Examples of container runtimes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;containerd: Developed by Docker and donated to Cloud Native Computing Foundation (CNCF). Used in Docker Engine.&lt;/li&gt;
&lt;li&gt;cri-o: Container Runtime commonly used in Kubernetes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Container Images
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;container image&lt;/strong&gt; is a file that contains all the dependencies and executable code for the container. It is a way of storing and sharing containers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Container Image Registries
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;container image registry&lt;/strong&gt; is a service that handles the storage and distribution of container images.&lt;/p&gt;

&lt;p&gt;Some of the common container registries are: DockerHub, Quay.io, etc.&lt;/p&gt;

&lt;h2&gt;
  
  
  Container Engine
&lt;/h2&gt;

&lt;p&gt;When a container runtime is expanded with CLI and/or GUI utility for&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Creation of containers&lt;/li&gt;
&lt;li&gt;Changing the state of container (starting, stopping, resuming, deleting)&lt;/li&gt;
&lt;li&gt;Managing container images&lt;/li&gt;
&lt;li&gt;APIs for developers to create layered products on top of it&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;it becomes a &lt;strong&gt;container engine&lt;/strong&gt;. Some examples of container engines are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Docker&lt;/li&gt;
&lt;li&gt;Podman&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Open Container Initiative (OCI)
&lt;/h2&gt;

&lt;p&gt;Open Container Initiative was established in 2015 for providing open specifications for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Container Runtime&lt;/li&gt;
&lt;li&gt;Container Image&lt;/li&gt;
&lt;li&gt;Container Image Distribution&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The objective is to establish a standardized format for the containers such that an OCI container image could be used between different container engines without any issues.&lt;/p&gt;

&lt;h2&gt;
  
  
  Docker
&lt;/h2&gt;

&lt;p&gt;One of the most commonly used container engines. It is developed by Docker, Inc.&lt;br&gt;
It uses a daemon (&lt;code&gt;dockerd&lt;/code&gt;) that provides all the management services for the container. This daemon runs with root privileges.&lt;/p&gt;

&lt;h2&gt;
  
  
  Podman
&lt;/h2&gt;

&lt;p&gt;The acronym for &lt;em&gt;Pod Manager tool&lt;/em&gt; is a daemonless container engine originally developed by Red Hat.  &lt;/p&gt;

&lt;p&gt;Unlike docker, it doesn't use any daemon for interactions with containers.&lt;br&gt;
It also has other security-focused features like the containers don't run as root by default. This reduces the attack surface as the host system cannot be accessed from the inside of the container.&lt;/p&gt;

&lt;h3&gt;
  
  
  Skopeo
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;skopeo&lt;/code&gt; is a CLI utility used alongside &lt;code&gt;podman&lt;/code&gt; for the management, inspection, and transfer of container images.&lt;/p&gt;

&lt;h3&gt;
  
  
  Buildah
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;buildah&lt;/code&gt; is another CLI utility used alongside &lt;code&gt;podman&lt;/code&gt; and &lt;code&gt;skopeo&lt;/code&gt; for building OCI container images.&lt;/p&gt;




&lt;p&gt;Originally posted on &lt;a href="https://www.bovem.in/posts/kubernetes/containers/"&gt;bovem.in&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.virtualbox.org/"&gt;Oracle VM VirtualBox&lt;/a&gt;&lt;br&gt;
&lt;a href="https://learn.microsoft.com/en-us/virtualization/hyper-v-on-windows/about/"&gt;Hyper-V&lt;/a&gt;&lt;br&gt;
&lt;a href="https://containerd.io/"&gt;containerd&lt;/a&gt;&lt;br&gt;
&lt;a href="https://cri-o.io/"&gt;cri-o&lt;/a&gt;&lt;br&gt;
&lt;a href="https://hub.docker.com/"&gt;DockerHub&lt;/a&gt;&lt;br&gt;
&lt;a href="https://quay.io/"&gt;Quay.io&lt;/a&gt;&lt;br&gt;
&lt;a href="https://opencontainers.org/"&gt;Open Container Initiative&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.docker.com/"&gt;Docker&lt;/a&gt;&lt;br&gt;
&lt;a href="https://podman.io/"&gt;Podman&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/containers/skopeo"&gt;Skopeo&lt;/a&gt;&lt;br&gt;
&lt;a href="https://buildah.io/"&gt;Buildah&lt;/a&gt;  &lt;/p&gt;

</description>
      <category>container</category>
      <category>podman</category>
      <category>docker</category>
      <category>vm</category>
    </item>
    <item>
      <title>How to do machine/deep learning on older laptops</title>
      <dc:creator>Avnish</dc:creator>
      <pubDate>Tue, 28 Aug 2018 09:34:06 +0000</pubDate>
      <link>https://forem.com/bovem/how-to-do-machinedeep-learning-on-older-laptops-5fo5</link>
      <guid>https://forem.com/bovem/how-to-do-machinedeep-learning-on-older-laptops-5fo5</guid>
      <description>&lt;p&gt;I have a really old HP Pavilion G6, which is capable of simple programming task(app/website development and writing scripts), but when it comes to deep learning specially with tensorflow, it just throttles and never gives output.&lt;/p&gt;

&lt;p&gt;I have heard about splitting task on GPU(my GPU isn't good either) but haven't tried it so can someone give me suggestions about doing deep learning stuff on older laptops?&lt;/p&gt;

&lt;p&gt;I have tried Kaggle kernels but the website becomes unresponsive sometimes.Also, I am a student so for now I don't have enough money to buy a new one&lt;/p&gt;

</description>
      <category>data</category>
      <category>python</category>
      <category>tensorflow</category>
      <category>help</category>
    </item>
    <item>
      <title>How to start contributing to open source?</title>
      <dc:creator>Avnish</dc:creator>
      <pubDate>Thu, 23 Aug 2018 06:09:25 +0000</pubDate>
      <link>https://forem.com/bovem/how-to-start-contributing-to-open-source-5g3l</link>
      <guid>https://forem.com/bovem/how-to-start-contributing-to-open-source-5g3l</guid>
      <description>&lt;p&gt;I have been programming in python for 3 years now and worked with Flask Framework, python's Data Analysis libraries(numpy, pandas, matplotlib, seaborn) and some machine learning in scikit-learn but I still haven't contributed to any open source project and I really want to contribute back to Python community. I try to look at libraries and contribute but usually I don't understand the code.&lt;/p&gt;

&lt;p&gt;Can someone help me with a beginner guide to open source projects?&lt;/p&gt;

</description>
      <category>help</category>
      <category>python</category>
      <category>data</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
