<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Nupur Negi on Medium]]></title>
        <description><![CDATA[Stories by Nupur Negi on Medium]]></description>
        <link>https://medium.com/@nupurnegi?source=rss-35b2bc1312ee------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*yFSTfXoyPh5yQ7FRYz83LQ.jpeg</url>
            <title>Stories by Nupur Negi on Medium</title>
            <link>https://medium.com/@nupurnegi?source=rss-35b2bc1312ee------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 21:21:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nupurnegi/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Is This the Real Life ?]]></title>
            <link>https://nupurnegi.medium.com/is-this-the-real-life-d80eae996920?source=rss-35b2bc1312ee------2</link>
            <guid isPermaLink="false">https://medium.com/p/d80eae996920</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[consiousness]]></category>
            <category><![CDATA[gen-ai-revolution]]></category>
            <dc:creator><![CDATA[Nupur Negi]]></dc:creator>
            <pubDate>Mon, 09 Mar 2026 17:11:48 GMT</pubDate>
            <atom:updated>2026-03-09T17:25:32.447Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>Started With Jensen Huang. Ended up Questioning Everything.</em></h4><p><strong>The Speaking Tree</strong> column titled, “<a href="https://timesofindia.indiatimes.com/speaking-tree/daily-ecstasy/why-jensen-huang-isnt-that-smart-about-smartness/articleshow/128963308.cms"><strong>Why Jensen Huang Isn’t That Smart About ‘Smartness</strong></a>’.”, a piece written by <a href="https://www.linkedin.com/in/sonal-srivastava-36b33aa3">Sonal Srivastava</a>, challenged the NVIDIA CEO’s definition of what it means to be smart.</p><p>Jensen had described a smart person as “someone technically astute, able to infer the unspoken, skilled at predictive analysis and number-crunching, essentially a human algorithm”.</p><p>The article goes back to Vedantic philosophy and the Bhagavad Gita, it argued that true intelligence must include empathy, emotional depth, and ultimately, consciousness itself.</p><p>It’s a beautiful argument. But it rests on one enormous assumption, that consciousness is something real, intrinsic, and irreducible. What if it isn’t?</p><h3>What If Consciousness Is Just Metadata?</h3><p>Consciousness most of us understand it is the feeling of being aware of knowing that you exist, that you’re thinking, that your actions mean something. It is the inner voice that says “I chose this” or “I felt that.”</p><blockquote>What if that voice is just your brain making up a story after the act?</blockquote><p>There is a famous experiment by <strong>Neuroscientist Benjamin Libet</strong>, that found brain activity, signalling a decision, happens about 300 milliseconds before a person is even consciously aware they have decided anything.</p><blockquote>Your brain “decided” before you “did’.</blockquote><p>When scientists studied split-brain patients, and triggered actions through one hemisphere, the other hemisphere would confidently, fluently invent explanations for those actions. It had no idea it was making things up.</p><p>Sound familiar…?</p><p><strong>Philosopher Daniel Dennett</strong> calls consciousness a “User Illusion”. <strong>Yuval Noah Harari </strong>goes further, arguing that the “self” is a fictional character narrated into existence , a story so convincing we forget we wrote it.</p><p><em>What if consciousness is not the source of your awareness but the story your brain tells about its own processing?</em></p><h3>The Feral Experiment</h3><p>To test this, consider a thought experiment: what if you isolated a newborn baby from birth, no language, no social interaction, no one to teach it what should feel scary, joyful, or sad? Would it develop consciousness on its own?</p><p>Probably not the way we know. Babies come hardwired with basic instincts, they cry from pain, they seek warmth. But the layered human experience, shame, nostalgia, identity, self-worth, those aren’t installed at birth. They are built slowly from everything we absorb from the world around us.</p><p><strong>Philosopher Ludwig Wittgenstein</strong> believes that,</p><blockquote><em>The limits of my language mean the limits of my world.</em></blockquote><p><em>Without words for “I” or “my feelings,” can a rich inner narrative even form?</em></p><p>This isn’t just theoretical. Feral children like <strong>Victor of Aveyron and Genie</strong>, who were isolated during critical developmental years, never fully developed self-awareness or layered consciousness. The data was missing. The “<em>story</em>”, never got written.</p><p>Thus we can say that, babies are not born conscious. They train on data, sensory input, emotional mirroring, language, social feedback and gradually construct a self.</p><h3>The <strong>Qualia</strong> of AI</h3><p>So, it seems to me that qualia might be buildable. And the method looks a lot like what made us. Just the material is different, flesh and neurons versus code and chips. But if what matters is the process, not the material, then we may not need to teach AI to be conscious. We may simply need to scale it and consciousness might arrive on its own.</p><p>The <strong>Turing Test</strong> asked whether AI could fool a human into thinking it was conscious. The deeper question is whether AI could fool itself in constructing an inner narrative similar to what we call awareness.</p><p>So for me, it is no longer, “humans have consciousness and machines do not.” It is now,</p><blockquote>We are not sure what consciousness is, we are not sure we fully have it, and we are not sure machines can’t develop it.</blockquote><h3>My Final Thought</h3><p>Perhaps the most strangely clear scenario I can give here is,</p><blockquote><em>The story of consciousness is so convincing that even questioning whether it is a story, feels like consciousness at work.</em></blockquote><p>We don’t fully understand consciousness, not in ourselves, and not in the machines we are building. We experience it, we assume it, we build entire philosophies around it. But we can’t yet prove it’s anything more than a very convincing story.</p><blockquote><strong><em>Maybe that’s what smart is, knowing you don’t know. 🤷‍♀️</em></strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d80eae996920" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Fairness Illusion: Why No Model Can Be Truly Fair]]></title>
            <link>https://nupurnegi.medium.com/the-fairness-illusion-why-no-model-can-be-truly-fair-c2346b21f1db?source=rss-35b2bc1312ee------2</link>
            <guid isPermaLink="false">https://medium.com/p/c2346b21f1db</guid>
            <dc:creator><![CDATA[Nupur Negi]]></dc:creator>
            <pubDate>Fri, 06 Mar 2026 07:41:39 GMT</pubDate>
            <atom:updated>2026-03-06T13:57:24.809Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BKvqSp0m1YNAp9UhBZTFrQ.png" /><figcaption>Fairness is an Illusion</figcaption></figure><blockquote>A model passes a fairness audit → it is “fair” → deploy with confidence.</blockquote><p>But passing <em>a fairness audit</em> means satisfying one specific metric, not fairness in any general sense.</p><blockquote>Calling a model fair based on a single metric is like calling a city safe based only on its fire department response time.</blockquote><p>Fairness is not a single property. It is multi-dimensional, context-dependent with conflicting criteria.</p><h3>Context-Dependency: Fairness Is a Moving Target</h3><p>In <strong>criminal sentencing</strong>, a false positive results in excess imprisonment. Here, equal <strong>FPR/False Positive Rate (Equalized Odds)</strong> is the most morally critical criterion.</p><p>In <strong>medical screening</strong>, a false negative (missing a sick patient) is the catastrophic error. Here, equal <strong>TPR/True Positive Rate (Equal Opportunity)</strong> matters most.</p><p>In <strong>credit scoring</strong>, a score should mean the same probability of default regardless of race. Here, <strong>Predictive Parity</strong> is the relevant criterion.</p><h3><strong>Conflict of Metrics: Some Fairness Goals Are Mathematically Incompatible</strong></h3><p>Even if you’ve chosen the right context and picked your metric, a deeper problem remains. Two metrics applied to the <em>same</em> model, on the <em>same</em> data, can mathematically <em>contradict</em> each other.</p><p><strong><em>→ Base rate(</em>prior probabilities<em>)</em></strong><em> is simply how often an outcome actually occurs in a group. For example, what percentage of people in a group truly reoffend, regardless of what any model predicts.</em></p><p>Chouldechova (2017)<em>[1]</em> proved that when two groups have different <strong>base rates </strong>satisfying Equalized Odds and Predictive Parity simultaneously is mathematically impossible. Not a tradeoff. Not an engineering challenge. Provably impossible.</p><p>COMPAS<em>[5]</em> is a recidivism prediction tool used in U.S. courts to help judges decide sentencing and bail. In 2016, ProPublica<em>[3]</em> investigated it and found that African American defendants were twice as likely to be falsely flagged as high risk, meaning the false positive rate was significantly higher for them. Equalized Odds was violated.</p><p>Northpointe<em>[2]</em>, the company behind COMPAS, pushed back. Their analysis showed that among defendants assigned the same risk score, the actual reoffending rates were equal across races, meaning a score of 7 meant the same probability of reoffending regardless of race. Predictive Parity held.</p><p>Both were correct. They were not disagreeing about the data. They were not disagreeing about the algorithm. They were measuring two different, mathematically incompatible things and since both races’ defendants had different base rates of reoffending in the dataset, both conditions could not hold at the same time. The math guaranteed that one would fail.</p><p>This is the uncomfortable part. Somebody had to choose which metric to optimise for. But that choice was never made explicitly in a room with stakeholders and affected communities/races. It was made quietly, buried inside a technical decision, when an engineer picked a metric and the model was built around it.</p><blockquote>Choosing a fairness metric is not a technical decision. It is a value judgment about which kind of error is acceptable and for “<em>whom</em>”.</blockquote><p>The difference is that value judgments should be made openly. Right now, most of them aren’t.</p><p><em>→ To understand the ProPublica vs Northpointe Controversy better check out this video by </em><a href="https://youtu.be/N-FPKnwh9Ig?si=ID_7jZ-Zf8hFzSTt"><em>Fusing Nature’s Joints</em></a><em>.</em></p><h3>Subgroup Interactions: Simpson’s Paradox in Fairness</h3><blockquote>Simpson’s Paradox occurs when a trend that appears across an entire dataset disappears or reverses within its constituent subgroups.</blockquote><p>In our case it arises due to the influence of the <strong>intersection of multiple protected attributes</strong>. So even if a model satisfies a fairness metric at the aggregate level, that guarantee can vanish or reverse entirely when you look at specific demographic subgroups<em>[4]</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wGcF1W5crfFs-IwXX-9_iw.png" /></figure><p>Consider a loan approval model. Across gender, it looks perfectly fair, both men and women are approved at 55%. It passes the audit.</p><p>But break it down by race within each gender:</p><ul><li>MajorityRace men: 65% approved. MinorityRace men: 40% approved.</li><li>MajorityRace women: 85% approved. MinorityRace women: 35% approved.</li></ul><p>The model didn’t treat people equally, it just averaged out its inequalities.</p><blockquote>Discrimination often hides precisely at the intersections. Thus, fairness auditing at the aggregate level is a form of mathematical illusion.</blockquote><h3>Dependence on Data: Garbage In, Fair Metrics Out</h3><p>All fairness metrics are computed against a dataset. So if the data reflect historical human bias, then a model that perfectly optimises a fairness metric can perpetuate serious discrimination.</p><blockquote>When biased model outputs are used to make decisions that generate new training data, bias “compounds”.</blockquote><p>Each generation of model can formally satisfy a fairness metric while the underlying disparity widens.</p><blockquote>“Fair on dataset D” is not the same as “fair in the world.”</blockquote><h3>Conclusion: Why “Fair” Is Never Enough</h3><p>Fairness is a multi-dimensional, context-dependent, data-dependent, metric-dependent family of criteria. Satisfying one fairness metric does not imply satisfying another, because the metrics are often mathematically incompatible. It does not imply fairness across subgroups, because aggregate metrics mask intersectional disparities. And it does not imply real-world fairness, because the metric is only as valid as the data it’s measured against.</p><p>The responsible path forward is not to find the “right” fairness metric but to be explicit about which metric is being used, why that metric was chosen, which subgroups and intersections were evaluated, and what assumptions the training data encodes.</p><blockquote>When we say a model is “fair,” we must always ask: fair by which definition?</blockquote><blockquote>Fairness is not a stamp of approval. It is an ongoing, multidimensional argument that must be made openly with all its contradictions on the table.</blockquote><h3>References</h3><p><em>[1] </em><a href="https://arxiv.org/abs/1703.00056"><em>Chouldechova, A. (2017). Fair Prediction with Disparate Impact: A Study of Bias in Recidivism Prediction Instruments. Big Data, 5(2)</em></a></p><p><em>[2] </em><a href="https://go.volarisgroup.com/rs/430-MBX-989/images/ProPublica_Commentary_Final_070616.pdf"><em>Dieterich, Mendoza &amp; Brennan — “COMPAS Risk Scales: Demonstrating Accuracy, Equity and Predictive Parity” (Northpointe, 2016)</em></a></p><p><em>[3] </em><a href="https://www.propublica.org/article/machine-bias-risk-assessments-in-criminal-sentencing"><em>Angwin, J. et al. (2016). Machine Bias. ProPublica.</em></a></p><p><em>[4] </em><a href="https://arxiv.org/abs/1711.05144"><em>Kearns, Neel, Roth &amp; Wu — “Preventing Fairness Gerrymandering: Auditing and Learning for Subgroup Fairness” (ICML, 2018)</em></a></p><p>[5] ProPublica vs Northpointe:- <a href="https://youtu.be/N-FPKnwh9Ig?si=ID_7jZ-Zf8hFzSTt">https://youtu.be/N-FPKnwh9Ig?si=ID_7jZ-Zf8hFzSTt</a></p><p><em>👉 Everything here is backed by real research. I’ve linked the sources as I go. Got a correction or a different take? I’d love to hear it 🤗</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c2346b21f1db" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DOCKERS USING REDHAT 8]]></title>
            <link>https://nupurnegi.medium.com/dockers-using-redhat-8-5de7bea89697?source=rss-35b2bc1312ee------2</link>
            <guid isPermaLink="false">https://medium.com/p/5de7bea89697</guid>
            <category><![CDATA[vincent]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[folium]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Nupur Negi]]></dc:creator>
            <pubDate>Sun, 03 May 2020 17:24:53 GMT</pubDate>
            <atom:updated>2020-05-11T11:34:02.734Z</atom:updated>
            <content:encoded><![CDATA[<h3>WEB APPLICATION USING DOCKER</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wXtyhpOL5NK_w39UvZpADQ.gif" /></figure><h3>WHAT IS DOCKER?</h3><blockquote>“A container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another. A Docker container image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings.”</blockquote><p>To run any program we need an Operating System. Installing, booting and logging into an OS requires about half an hour. What if we need to run a program and delete the OS then again run the program and delete the OS and repeat the process. A Docker Container can do this task in a few seconds.</p><p>There are three ways of running an OS on a machine.</p><ol><li><strong>Bare Metal</strong>: Installing OS directly on the hardware.</li><li><strong>Virtualisation</strong>: Using a hypervisor (like oracle virtual box) and running the image of the OS over it.</li><li><strong>Cloud</strong>: Running the OS in the cloud instead of the hard drive.</li><li><strong>Docker</strong>: Running OS in the Container using the Docker Container Engine.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/659/1*sie2d1LrsWi0KJ1QM2K5Dw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/646/1*Y_iV9RqJ0Usk_CReLIQWjw.jpeg" /></figure><h3>ABOUT THE PROJECT</h3><p>The project is based on a dynamic Indian map which displays the current covid19 situation in India using folium, vincent, pandas and various other packages in python. The map shows the current covid19 cases in India and is made interactive for the user and also provides the helpline for each state respectively.</p><p>The website runs inside a container. The container is running on Redhat 8 Operating System. Various Docker concepts will be covered in this project, like Networking, Storage, Creating an image of a Container, Network alias, Setting up Server, YAML and much more.</p><h3>SETTING UP THE PREREQUISITES</h3><p><strong>YUM</strong></p><p>YUM in RHEL8 is a package managing tool which is used to install, remove, update or search a software.</p><blockquote><strong>Step 1: </strong>From the root user go to the location <strong>/etc/yum.repos.d/</strong></blockquote><blockquote><strong>Step 2: </strong>Create a repo of any name except those which already exists in the folder. Check by using <strong>ls </strong>command (new.repo).</blockquote><blockquote><strong>Step 3: </strong>Type the code given in <em>fig 1</em> in the repo file and save it.</blockquote><blockquote><strong>Step 4: </strong>Check if yum is configured but using the command <strong>yum repolist</strong></blockquote><blockquote><strong>Step 5: </strong>Install Python3.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zh6mGC_UYnlrXpi0YwfIaA.png" /><figcaption>fig 1</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/1*kpIBp_lRzl0deaDQiO1svA.png" /><figcaption>fig 2</figcaption></figure><p><strong>DOCKER</strong></p><p>Installing Docker over the base OS RHEL 8.</p><blockquote><strong>Step 1:</strong> Install Docker using yum command:- <strong><em>yum install docker-ce --nobest</em></strong></blockquote><blockquote><strong>Step 2:</strong> Check Docker version after installation:- <strong><em>docker version</em></strong></blockquote><blockquote><strong>Step 3:</strong> Configure the Docker repository in the location <strong><em>/etc/yum.repos.d/ </em></strong>of base OS RHEL 8 by creating a repo named <strong><em>docker.repo</em></strong>,<strong><em> </em></strong>write the code given in <em>fig 3</em> and save the file.</blockquote><blockquote><strong>Step 4:</strong> Start the Docker:- <strong><em>systemctl start docker</em></strong></blockquote><blockquote><strong>Step 5: </strong>Get an image of Centos:latest from Docker Hub Public Repository:- <strong><em>docker pull centos:latest</em></strong>.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8Pt8pZZsvp7BMfiUbMuLMw.png" /><figcaption>fig 3</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/789/1*gUrHUuRwqY14ZAeVlbmpwA.png" /><figcaption>fig 4</figcaption></figure><p><strong>APACHE WEB SERVER</strong></p><blockquote>Install Apache :- <strong><em>yum install httpd</em></strong></blockquote><blockquote>Start the web server :- <strong><em>systemctl start httpd</em></strong></blockquote><h3>CREATING VOLUME FOR PERSISTENT STORAGE</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/502/0*Powexfd1hDUfmbBR.png" /></figure><p>There are two types of storage ephemeral and persistent. Ephemeral storage is temporary whereas persistent storage is permanent. Here, by saying that ephemeral storage is temporary means that the data stored in this storage exists as long as there is no corruption in the OS.</p><p>When a server(Container) fails then another server runs within a second but all the data stored in the previous server gets destroyed, as data stored in Docker in ephemeral. Hence there is a need to create persistent storage which can be shared by various containers. This way changes made on the data by any of the servers are visible from the other servers and also a failure of any server will not affect the data. This is because the storage/volume takes the space from local drive i.e. RHEL8 (base OS of the Docker).</p><blockquote>Create a volume:- <strong><em>docker volume create storage1</em></strong></blockquote><p>Binding of the storage to a file will be done while launching the Container.</p><h3>BUILDING UP A LOCAL AREA NETWORK</h3><p>Docker creates isolation of networks i.e. two containers in different networks can not communicate/ping each other. This network isolation provides safety and also the data traffic of the Containers gets distributed. If in a network we have various Containers then for the containers to ping each other we have to create a link between them. This link will be created while launching the Container.</p><p>Creating a local area network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*hp0jwDTZSCwEUMOByv49wg.png" /></figure><h3>LAUNCHING THE SERVER CONTAINER</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3HKIhiFLRfttLd1eTVYbXw.png" /><figcaption>fig 5</figcaption></figure><p>The command for launching the Container is shown in <em>fig 5.</em></p><p>Option <em>-it </em>means the Container will open in interactive mode and a terminal will launch.</p><p>Name of the Container is given using the <em>name</em> option.</p><p>All the webpages in Apache Webserver are saved in the folder <em>/var/www/html</em>. At the time of server failure, we do not want to lose these data and also any changes made in the data by a server should be reflected in all other servers. Hence we will mount the storage/volume at this location.</p><p>For yum to work inside the container, the most reliable method is to get a copy of local yum set up inside the Container. This is done by getting all the data of <em>/run/media/root/RHEL-8–0–0-BaseOS-x86_64 </em>and keep a copy in the Container using<em> -v.</em></p><p>Sometimes when we ping a site multiple times we get a different IP address. This might happen because they have various servers(Containers) having a common name but different IP addresses. This common name is called alias name. The alias name is created using the command — <em>network-alias.</em></p><p>When an outside client wants to connect to the server it communicates with the router and using the network bridge to get connected, but if the client has to reach a particular Container of the server. Hence to direct the router of which Container server has been called by the client port number is given to each Container. Here we have given 8080:80 to our server.</p><p>Finally, the network name and the OS image to be taken for launching the Container is given. Now we are inside the Container.</p><p>The copy of local yum data is stored in this Container, so all we have to do is create a repo pointing to that location where this copy is saved. Before that, we have to remove all the existing repos from the Container<em>(fig 6)</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*tbHEAprsfO6lO3nmSiAImg.png" /><figcaption>fig 6</figcaption></figure><p>Now create a repo with any name(new.repo) and write the below code as shown in <em>fig 7</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/0*dUThtqe0KpkqgCaG" /><figcaption>fig 7</figcaption></figure><h3>BUILDING WEBSITE IN THE SERVER CONTAINER</h3><p>Given below is the python code which is generating a map using folium and marking all the states using the coordinates stored in a CSV file. These markers show the count of current corona positive cases in each state and detail information about it. These data are being extracted from the MOHFW site.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*Tcr4SAZm1iKTKUGtX7JPuw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kmlBsI9LICxHSs0nYQpX2g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m4yuPzsYfV4gG0v1GRxCOQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qjyYESCXHBFw9UK-frRBIA.png" /></figure><p>Running Shell command inside PHP to run Python <em>(fig 8).</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/503/1*lcLMpMzOcefQOBhF_P4JJg.png" /><figcaption>fig 8</figcaption></figure><p>To run this python code installation of few modules is required.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/529/1*s7rkaPOfGLxrMrnTbpf_Kw.png" /><figcaption>fig 9</figcaption></figure><p>Installation of Apache Web server inside the Container using yum:- <strong><em>yum install httpd</em></strong></p><p>Outside the Container starting the server and keeping it on even after multiple restarts of the OS is simple.</p><blockquote>To start the server:- <strong><em>systemctl start httpd</em></strong></blockquote><blockquote>To keep the server on even after restart:- <strong><em>systemctl enable httpd</em></strong></blockquote><p>But inside the Container systemctl does not work. Systemctl is a process which communicates over systemd. Systemd is a process which runs while booting the OS(like init in ubuntu). On launching a Container booting never happens thus, systemd never runs. Hence, systemctl does not work inside the Container.</p><p>Each time we start a Container .bashrc runs. So, adding a few lines of command will make the server to run even after multiple restarts. Location of the file is /root/.bashrc. Make the changes as shown in the <em>fig 10</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*xRa91ZwWJ-4wrljvWPZx-g.png" /><figcaption>fig 10</figcaption></figure><h3>RUNNING THE WEBSITE</h3><h4>RUNNING THE WEBSITE IN WINDOWS</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WrjhUfE5OA43XuAPY-4FBw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o7skKJDyj_zpj8PZCYIOwg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oxocHkVyBsEwT5AdXH_nsg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7_vuc9tnKDz6ud41ozoO3g.png" /></figure><h3>CREATING MULTIPLE SERVERS</h3><p>Having only one server is not preferable. As the number of clients increases the load on the server increases resulting in it’s slowing down. If there is only one server then crashing down of that server will not be acceptable. Hence there is a need to have multiple servers. All these servers will share the storage/ volume. The traffic of one server will not go to another. Thus the load will be balanced.</p><p>To have multiple servers more containers are supposed to be created such that all are a clone of each other (except the IP). Creating a huge number of containers manually is time-consuming and is not the most accurate way. There are two ways to create such a huge number of containers.</p><h4>I. CREATING IMAGE OF THE CONTAINER &amp; UPLOADING IT IN THE DOCKER HUB PUBLIC REPOSITORY</h4><p>In fig 11 below creating an image of container c1 with a name server_image versions1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p0cyHhQMXTiR6j2UA0J9Vw.png" /><figcaption>fig 11</figcaption></figure><p>Log in to Docker Hub and Upload the image. Make sure you have verified your email id before uploading.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pg9SfAwNV2ts1Ak3Igiwow.png" /><figcaption>fig 12</figcaption></figure><blockquote>docker <em>tag old_name</em> <em>user_name/new_name</em></blockquote><blockquote>docker push <em>user_name/new_name</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CAvMJmlEQbxlAClnjapg9w.png" /><figcaption>fig 13</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qX1UhB7ZJQvPO88lInY7QA.png" /><figcaption>fig 14</figcaption></figure><h4>II. YAML CODE TO AUTO CREATE DOCKER CONTAINER</h4><blockquote>“Infrastructure as code is the process of managing and provisioning computer data centers through machine-readable definition files, rather than physical hardware configuration or interactive configuration tools.”</blockquote><p>It is difficult to create containers on large scale manually. Hence Infrastructure as code can be used to create machine understandable code to make this process automated. One type of Infrastructure as code is YAML (Yet Another Markup Language).</p><p>For using YAML in Dockers we need to download Docker Compose.</p><p>Install Docker-compose</p><blockquote>sudo curl -L “https://github.com/docker/compose/releases/download/1.25.4/docker-compose-$(uname-S)-$(uname-m)”-o /usr/local/bin/docker-compose</blockquote><blockquote>sudo chmod +x /usr/local/bin/docker-compose</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zhvrtNdKKKRrfMVMy-HkYw.png" /><figcaption>fig 14</figcaption></figure><p>Make a directory to store all the Docker compose files.</p><blockquote>#mkdir /mycompose</blockquote><blockquote>cd /mycompose</blockquote><blockquote><em>vi docker-compose.yml</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8TjVGJJuQFlOO96GrZH0Yg.png" /><figcaption>fig 15</figcaption></figure><p>Run the YAML code</p><blockquote><em>docker-compose up -d</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LNcFcLFcBZKUiaFCW7qW2Q.png" /><figcaption>fig 16</figcaption></figure><p>The above screenshot shows that the new storage has been created.</p><p><strong>Github link: </strong><a href="https://github.com/Codacks/Covid19_IndianMap_UsingFoliumAndDocker">https://github.com/Codacks/Covid19_IndianMap_UsingFoliumAndDocker</a></p><h4>Authors:</h4><p>Mehul Jain &amp; Nupur Negi</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5de7bea89697" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>