<?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 Wasilios Goutas on Medium]]></title>
        <description><![CDATA[Stories by Wasilios Goutas on Medium]]></description>
        <link>https://medium.com/@w-goutas?source=rss-4e1b78bd21ba------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*kDGMaCVxA9TWsfL6dhxN6g.png</url>
            <title>Stories by Wasilios Goutas on Medium</title>
            <link>https://medium.com/@w-goutas?source=rss-4e1b78bd21ba------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 01:44:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@w-goutas/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[official vaccination deaths in 2021]]></title>
            <link>https://w-goutas.medium.com/official-vaccination-deaths-in-2021-4d13d3b9c04e?source=rss-4e1b78bd21ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/4d13d3b9c04e</guid>
            <category><![CDATA[covid19]]></category>
            <category><![CDATA[vaccine-death]]></category>
            <dc:creator><![CDATA[Wasilios Goutas]]></dc:creator>
            <pubDate>Fri, 03 Dec 2021 07:41:09 GMT</pubDate>
            <atom:updated>2021-12-03T07:41:09.755Z</atom:updated>
            <cc:license>https://creativecommons.org/publicdomain/mark/1.0/</cc:license>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QbJG-_yoLh1o4ihf" /><figcaption>Photo by <a href="https://unsplash.com/@theshubhamdhage?utm_source=medium&amp;utm_medium=referral">Shubham Dhage</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>This article I wrote for my kids, to give them an idea on how to get a view on official vaccination thread data, by someone they have faith in.</p><p>I will show a way in Python to read, check and fix data, export them to csv and visualize them in Excel. Code and Excel/open document workbook are available at <a href="https://github.com/laiki/VAERS">https://github.com/laiki/VAERS</a></p><p>VAERS (Vaccine Adverse Event Reporting System) is used to monitor vaccine adverse effects in the U.S. If I find a similar detailed official downloadable database for Europe or even global I will adapt my github project to make use of them as well.</p><p>The data I ‘m making use of can be downloaded Download on <a href="https://vaers.hhs.gov/data.html">https://vaers.hhs.gov/data.html</a>. You will mention, that an online analysis of them is also provided, but this is not in scope of this article.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1ambHk2PPlAAb4_dDPK86Q.png" /><figcaption>options to VAERS data processing</figcaption></figure><p>On the download dataset page you will be able to select the year of VEARS reported data as well a data use guide explaining the attributes contained it. In this article I’m referring to data of year 2021 downloaded on 1st Dec 2021 where I selected the zip archive of the selected year.</p><p>The files archive contains 3 CVS files containing the adverse report, symptoms and details on the used vaccine which are related to each other by the attribute ‘<em>VAERS_ID</em>’. Extraction and loading of the table data I did in a Python3 environment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/1*ZOpxQwKgRGyhOjjaF5akrQ.png" /><figcaption>picture source: author</figcaption></figure><p>The VAERS dataset contains information on all reported adverse effects, but for now I’m focusing on the deaths related to vaccination. Fortunately the main document (2021VAERSDATA.csv) contains an attribute called <em>DIED </em>enabling filtering on them, and it shows, that out of the ~700k entries ~9200 reporting that the vaccination patient died. This numbers include all vaccination events, not only he COVID-19 related.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/1*40M7RLRaGuGPl7AeLmSr9Q.png" /><figcaption>picture source: author</figcaption></figure><p>My analysis of the raw data showed, that the date of death is not always set, so after converting it to a format I like, I set the missing dates by the attributes <em>TODAYS_DATE,</em>VAX_DATE or <em>RECVDATE</em>, dependent of there availability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/1*b--bjWu1afQra9bGpGV0Qw.png" /><figcaption>picture source: author</figcaption></figure><p>Adding additional attributes to enable easy counting of patients sex is been also performed, but not really needed for the later processing in Excel. It can be used to calculate the spread of deaths between male, female and unknown sex.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*zC4rqh3XJgY-z6WEkQrXPg.png" /><figcaption>picture source: author</figcaption></figure><p>As the vaccine details are part of a separated file called in this case 2021VAERSVAX.csv, and I want them to be part of the filtered <em>deaths</em> data frame, additional processing regarding mapping the content of the data frames by the attribute VEARS_ID is needed. In this step an additional attribute containing the count of vaccinations the dies patient received is been added.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/888/1*ovVKHRAxZ9FM_-HXPk0uoA.png" /><figcaption>picture source: author</figcaption></figure><p>Once this is done, the data frame can be exported for visualization in e.g. Excel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/453/1*pZb8fCyyIa99qheLHxKJmQ.png" /><figcaption>picture source: author</figcaption></figure><p>Further processing in Excel shows, that the 9261 vaccination related deaths reported in the VAERS data in 2021 beginning of December (the difference of 1 event compared to the over all number of entries in the dataset needs to be analyzed)</p><p>8971 deaths have been reported in combination with COVID-10 vaccinations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/837/1*bgwfsINWuCsX9ENVSA9idQ.png" /><figcaption>picture source: author</figcaption></figure><p>290 deaths are related to non COVID-19 vaccines.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*XFjdHI-ih3o3oPpKUbXTdg.png" /><figcaption>picture source: author</figcaption></figure><p>There are a lot more attributes worth being analyzed this way in the downloadable data set. This overview of deaths should is as mentioned at the beginning of the article only a hint to check official available data and compare them with the information published by mainstream media.</p><p>When it come to a significant reduction of COVID-19 vaccination related events in the media, consider that the definition of ‘vaccinated’ at least in Germanies latest regulation updates changed in a way, that a person is ‘vaccinated’ once a proof of COVID-19 vaccination exists <strong>and </strong>he/she does not show typical COVID-19 symptoms, see <a href="https://www.gesetze-im-internet.de/schausnahmv/index.html">SchAusnahmV §2</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d13d3b9c04e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Set-up a Kubernetes cluster in minutes]]></title>
            <link>https://w-goutas.medium.com/set-up-a-kubernetes-cluster-in-minutes-41a0bd65ab93?source=rss-4e1b78bd21ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/41a0bd65ab93</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[rancher]]></category>
            <category><![CDATA[rke]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[k3]]></category>
            <dc:creator><![CDATA[Wasilios Goutas]]></dc:creator>
            <pubDate>Sun, 07 Feb 2021 14:36:02 GMT</pubDate>
            <atom:updated>2021-02-07T14:36:19.678Z</atom:updated>
            <cc:license>https://creativecommons.org/publicdomain/mark/1.0/</cc:license>
            <content:encoded><![CDATA[<p>If you would like to set-up your own low budget Kubernetes cluster, do it as I did, with Rancher’s <em>K3s</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VY0KUHuB8VxB78sF" /><figcaption>Photo by <a href="https://unsplash.com/@kent_pilcher?utm_source=medium&amp;utm_medium=referral">Kent Pilcher</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Not only Google provides a Kubernetes implementation as they invented it, but other companies as well. At the Cloud Native Computing Foundation you can find a <a href="https://www.cncf.io/announcements/2017/11/13/cloud-native-computing-foundation-launches-certified-kubernetes-program-32-conformant-distributions-platforms/">list of Kubernetes programs certified by the CNCF</a>. One of the companies providing such is Rancher which is providing two Open Source Kubernetes implementations, Rancher Kubernetes Engine (<em>RKE</em>) and <em>K3s</em>.</p><p>My reasons for choosing Rancher are: it is Open Source, Rancher’s web UI is great and they provide free <a href="https://academy.rancher.com/">online curses on Kubernetes</a> and other <a href="https://rancher.com/learning-paths/">trainings</a>.</p><p>In this article I’m going to show you how you can set-up a lightweight Kubernetes cluster with <em>K3s</em>.</p><p>First the explanation about the naming of <em>K3s</em> which can be found on the <a href="https://rancher.com/docs/k3s/latest/en/">documentation</a> page of <em>K3s</em></p><blockquote><em>We wanted an installation of Kubernetes that was half the size in terms of memory footprint. Kubernetes is a 10-letter word stylized as K8s. So something half as big as Kubernetes would be a 5-letter word stylized as K3s. There is no long form of K3s and no official pronunciation.</em></blockquote><p><strong>Prerequisits</strong></p><p>As <em>K3s</em> is a lightweight Kubernetes version it’s requirements to CPU and memory are quite low and defined by</p><ul><li>512MB RAM recommended is 1GB)</li><li>1 CPU</li></ul><p>Resource test results can be found <a href="https://rancher.com/docs/k3s/latest/en/installation/installation-requirements/resource-profiling/">here</a>.</p><p>Well, what I really like is that <em>K3s</em> does not need much network ports. I set-up an <em>RKE</em> cluster first and tried to open the ports needed to let my hope PC be part of the cluster, which ended up in a nightmare of forwarding rules.</p><p><em>K3s</em> needs to be able to communicate through the ports 6443(TCP), 8472(UDP), 10250(TCP) and for HA clusters the range of 2379–2380(TCP).</p><p>Compared to <em>RKE</em> this is relay a minimum port set which you have to take care of ;)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/918/1*612iXNINd5_cpr_ff68alA.png" /><figcaption>Rancher K3s inbound rule <a href="https://rancher.com/docs/k3s/latest/en/installation/installation-requirements/">documentation</a></figcaption></figure><p>The operating system <em>K3s</em> is running on is Linux. The machines I’m making use of in this article, are all Linux Ubuntu systems.</p><p><strong>installing the server</strong></p><p>I use 2 VPS systems of a service provider running Ubuntu 20.04 which I’m going to run Kubernetes on. It will not become a High Availability cluster, as this would need at least 3 server, although <em>K3s</em> enables us to set-up up a HA cluster even with only 2 server — this is possible when making use of an external database which is an configuration option — . <em>K3s</em> supports the use of datastores other than etcd, which seems to be a unique feature of <em>K3s </em>and enables you to choose PostgreSQL, MySQL, MariaDB, embedded SQLite or etcd as Kubernetes key-value store.</p><p>A <em>K3s</em> cluster consists of at least one server node which would be a single node cluster. Additional agent nodes to the cluster is been done by registering to the server[s] by making use of a shared cluster token.</p><p>I’m going to show how to set-up a cluster containing one server and one agent and also how to set-up a cluster with multiple servers (the agent set-up will be the same for all configurations).</p><p>On the first of my machines I run following command to get the <em>K3s</em> server installed.</p><blockquote>curl -sfL <a href="https://get.k3s.io/">https://get.k3s.io</a> | sh -</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/765/1*pPvM2G0HKwGvzjKgGC2b-A.png" /><figcaption>K3s server / one node cluster installation in &lt; 1 min</figcaption></figure><p>The installation process supports also configuration options which needs to be set via environment variables. Details to the options can be found <a href="https://rancher.com/docs/k3s/latest/en/installation/install-options/">here</a>. For me the defaults are good, but to demonstrate how to e.g. set the channel to download <em>K3s</em> from (the supported channels are: stable, latest, testing), I uninstall my previous installation by the command</p><blockquote>k3s-uninstall.sh</blockquote><p>and install the server from the channel ‘stable’ (which is the default) by running</p><blockquote>curl -sfL <a href="https://get.k3s.io/">https://get.k3s.io</a> | INSTALL_K3S_CHANNEL=”stable” sh -s -</blockquote><p>The system now is configured to start the <em>K3s</em> server as a ‘systemd’ service.</p><p>In the Kubernetes world, the <strong>kubectl</strong> command is the main tool to control the cluster. Once you installed <em>K3s </em>by using the above scripted installation, kubectl will be callable as it is a link to the k3s binary. Alternatively you can call it as parameter to k3s e.g. “k3s kubectl &lt;kubectl command&gt;“</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/879/1*r6BfPV_2ttO4z9n6DfUiow.png" /><figcaption>k3s binary usage</figcaption></figure><p>Any agent you want to add to the <em>K3s</em> cluster controlled by the server installed above, need to be configured to use the token provided by the server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*jlYH24pwdXsGw10Pq3F1eQ.png" /><figcaption>cluster-info &amp; node token</figcaption></figure><p>Read the token (the complete line) from the file “/var/lib/rancher/k3s/server/node-token” as you will need it during the agent installation.</p><p><strong>registration of agents</strong></p><p>The installation of agents is been done by calling the k3s binary with the command ‘agent’ and provide it additional parameters. The mandatory parameters are --server and --token. The server has to be addressed with https protocol on port 6443, the token comes from the <em>K3s</em> server installation. This parameters can be set also via environment variables as the command “k3s agent --help” shows us.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SNyjwilpz6gaMK3cmCXKpw.png" /><figcaption>k3s agent --help</figcaption></figure><p>The installation script used for the server can be used also to set up an agent. You just need to add the command ‘agent’ and the parameters mentioned earlier. I will make use of the environment variables K3S_URL and K3S_TOKEN to provide this values to the installation script.</p><p>The script to set up an agent is the same as the one used to set up a server. Internally it is checking if the environment variable K3S_URL is set. If so, it installs the agent, otherwise the server. As I’m setting the variable before, the command to run the installation is exactly the same as in the server installation chapter.</p><blockquote>curl -sfL <a href="https://get.k3s.io/">https://get.k3s.io</a> | sh -s -</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*CHcbjytnU65VJGKQZ0BOyg.png" /><figcaption>k3s agent set-up</figcaption></figure><p>On the serer you will be able to check the availability of the newly added agent by calling</p><blockquote>k3s kubectl get node</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/1*VCA8yKOUUBLCXkMzbKJ0Og.png" /><figcaption>k3s kubectl get node</figcaption></figure><p>The set-up of a Kubernetes cluster, consisting of one server and one agent, is done by just a handful commands :)</p><p>The agent installation provides your system also with an script to uninstall it from the node. To uninstall the agent just call:</p><blockquote>k3s-agent-uninstall.sh</blockquote><p><strong>High Availibility cluster</strong></p><p>For a HA cluster you must have an odd number of server nodes (minimum 3). As I just have 2 nodes, what I’m going to set-up here will not be an HA cluster, and is just to demonstrate how the installation can be done.</p><p>Basically setting up a cluster with multiple servers means running one server instance with the flag --cluster-init to enable clustering and provide the same secret token to all server installations.</p><p>Before I start, I uninstall the server and agent instances from my nodes by the commands k3s-uninstall.sh and k3s-agent-uninstall.sh.</p><p>Every node needs to make use of the same secret token, so on both systems I could define the environment variable K3S_TOKEN, but in this case I will provide it as parameter to the installation script.</p><p>On the first node I need to run the server with the parameter --cluster-init so the installation command I make use of is the following:</p><blockquote>curl -sfL <a href="https://get.k3s.io/">https://get.k3s.io</a> | sh -s server --cluster-init --token “topsecret”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/755/1*3IvFuYO5Q2q9ulILkjOc7w.png" /><figcaption>k3s server installation with predefined token and initialization of cluster</figcaption></figure><p>On the second node the same token must be used and in addition the parameter --server pointing to the node running the server which initialized the cluster. This time I will provide the token as environment variable, just to show this option as well.</p><blockquote>curl -sfL <a href="https://get.k3s.io/">https://get.k3s.io</a> | K3S_TOKEN=”topsecret” sh -s server --server <a href="https://vmd62521.contaboserver.net:6443/">https://vmd62521.contaboserver.net:6443</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/985/1*sbVlsCyMPZEU95-9zheahA.png" /><figcaption>second server set-up</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*FsQgu2W8mADCYa_qkhxqpg.png" /><figcaption>multi server set-up</figcaption></figure><p>Now both servers have been set-up and build one Kubernetes cluster.</p><p>Any additional server node would be added as the second one. With an odd number of servers (minimum of 3) or at least 2 servers configured to use an external data store the cluster would become an High Availability cluster which sounds complicated but as shown is quite easy to be done.</p><p>My private PC runs [K]Ubuntu 20.04, and I want it to be part of the <em>K3s</em> Kubernetes cluster. I have a dynamic DNS entry and am able to reach my home network from outside. Unfortunately my router has a problem forwarding the port range 2379–2380(TCP) :( so I fail on getting the prerequisites to add it as third server, but I could add it as agents to the cluster. Let’s try ;)</p><p>I set-up the agent by calling the installer with the command ‘agent’ and use the same token as the servers.</p><blockquote>curl -sfL <a href="https://get.k3s.io/">https://get.k3s.io</a> | K3S_TOKEN=”topsecret” sh -s agent --server <a href="https://vmd62521.contaboserver.net:6443/">https://vmd62521.contaboserver.net:6443</a></blockquote><p>10 sec. later my home PC is part of the K3s Kubernetes cluster :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C-S0iK4pBiLm0CexkZZhKQ.png" /><figcaption>add local PC as agent to cluster</figcaption></figure><p>On the server nodes the command</p><blockquote>k3s kubectl get nodes</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*ATsICblB9vkh5Isx_np5Yg.png" /></figure><p>lists my local PC as part of the cluster.</p><p>That’s it! The Kubernetes cluster has been set up.</p><p><strong>Ranchers WebUI</strong></p><p>At the beginning of the article I mentioned, that Rancher provides a great WebUI. As I think it is worth to write an own story on the installation of it, so I plan to do so soon.</p><p><strong>Summary</strong></p><p>In this article I tried to show you how easy it is to set up a lightweight and low budget Kubernetes cluster with <em>K3s.</em></p><p>The only thing needed is the k3s binary which implements everything needed to create a Kubernetes cluster.</p><p>By using the script provided on <a href="https://get.k3s.io/">https://get.k3s.io</a>, the installation is very comfortable. The glue between servers and agents is the token which is been created during the server installation or is been provided by yourself during installation.</p><p>Thank you for reading!</p><blockquote><strong>My name is Wasilios Goutas, I’m Dipl. Ing. techn. Informatik (FH) which I studied in my home town Hamburg, Germany. I’m experienced software project manager in the automotive and semiconductor industries. In my private life I’m making use of AI libraries like Keras &amp; Tensorflow to learn more about the technology which will play a significant role in tomorrows world.</strong></blockquote><blockquote><strong>Feel free to contact me on </strong><a href="http://www.linkedin.com/in/wgoutas"><strong>LinkedIn</strong></a><strong>.</strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=41a0bd65ab93" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Track your experiments with ClearML — in Docker]]></title>
            <link>https://w-goutas.medium.com/track-your-experiments-with-clearml-in-docker-37c5bdb3c582?source=rss-4e1b78bd21ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/37c5bdb3c582</guid>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[clearml]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Wasilios Goutas]]></dc:creator>
            <pubDate>Wed, 27 Jan 2021 18:45:44 GMT</pubDate>
            <atom:updated>2021-01-27T18:45:44.849Z</atom:updated>
            <cc:license>https://creativecommons.org/publicdomain/mark/1.0/</cc:license>
            <content:encoded><![CDATA[<h3>Track your experiments with ClearML — in Docker</h3><blockquote>Do you remember the history of your ML experiments?</blockquote><blockquote>Would you like to be able to do so with only 2 lines of code?</blockquote><p>This I already asked in my <a href="https://medium.com/@w.goutas/track-your-experiments-with-clearml-b26b2d0d6518">earlier</a> post. Now the question is</p><blockquote>Do you want your experiments to be hosted on your own system?</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8NKs9ODk9gzzFbvEcivMGQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@ant0ine?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Antoine Petitteville</a> on <a href="https://unsplash.com/s/photos/container?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>In my last post I showed you how to use a freely accessible <em>ClearML</em>-server, provided by the maintaining company of <em>ClearML, </em>to host your Machine Learning projects and experiments.</p><p>Once you start using this platform to manage your ML/DL work you will notice, that it is more than just a storage of experiments enabling you to to re-execute and compare results without any effort. With ClearML you can do much more like the ‘Orchestration of Pipelines’ where your script might enqueue different tasks to be processed through queues and agents running somewhere in the cloud or locally, scaling horizontally with the availability of agents, or enabling you to use the MongoDB instance which is part of the platform, …</p><p>Sooner or later you might think it would be a good idea to self host an <em>ClearML</em>-server where I think the most important reasons for this will be the fact, that the free service on <a href="https://clear.ml/">clear.ml</a> might delete your experiments once the usable storage size per account has reached its limit.</p><p>Also, if you are not working on Open Source ML/DL projects, you might feel safer to have your intellectual property been hosted by systems controlled by you or your company.</p><p>This article is going to show you, how to set-up the <em>ClearML</em> on an Linux box.</p><p><strong>Docker</strong></p><p>As I’m going to show how to run the <em>ClearML</em>-server in Docker you have to install docker and docker-compose first.</p><p>I expect that you have the needed binaries on your system and calls to “docker --version” and “docker-compose --version” provide you corresponding information. If not, and you plan to run the <em>ClearML</em>-server in Docker I think you know what you have to do first ;) If you need support for getting the tool installed on an Ubuntu machine you might try the script I provide in <a href="https://github.com/laiki/ClearML_playground.git">my Github repository to this series</a>.</p><p><strong>compose it</strong></p><p>As the <em>ClearML</em>-server is going to use the ports 8080/8081/8008 you should check if they are already in use and take actions to free them if so. You can check if the ports are in use by e.g.</p><blockquote>sudo lsof -Pn -i4 | grep -E &quot;:8080|:8081|:8008&quot;</blockquote><p>If any of the ports is in use, you need to release it, otherwise you will fail to get the <em>ClearML</em>-server running.</p><p>You will need to set-up some Linux environmental stuff which is is shown here:</p><blockquote>echo &quot;vm.max_map_count=262144&quot; &gt; /tmp/99-clearml.conf<br>sudo mv /tmp/99-clearml.conf /etc/sysctl.d/99-clearml.conf<br>sudo sysctl -w vm.max_map_count=262144<br>sudo service docker restart</blockquote><blockquote>sudo rm -R /opt/clearml/<br>sudo mkdir -p /opt/clearml/data/elastic_7<br>sudo mkdir -p /opt/clearml/data/mongo/db<br>sudo mkdir -p /opt/clearml/data/mongo/configdb<br>sudo mkdir -p /opt/clearml/data/redis<br>sudo mkdir -p /opt/clearml/logs<br>sudo mkdir -p /opt/clearml/config<br>sudo mkdir -p /opt/clearml/data/fileserver</blockquote><blockquote>sudo chown -R 1000:1000 /opt/clearml</blockquote><p><em>ClearML</em> is an Open Source product and hosted on <a href="https://github.com/allegroai">Github</a>. The <em>ClearML</em>-server is an own repository and contains a YML file we need to make use of, so you need to get a copy of the file <a href="https://raw.githubusercontent.com/allegroai/clearml-server/master/docker/docker-compose.yml">docker-compose.yml</a> being part of <a href="https://github.com/allegroai/clearml-server.git"><em>ClearML</em>-server</a> project. Clone or download this file, as you will need to edit and use it in the next steps.</p><blockquote>git clone <a href="https://github.com/allegroai/clearml-server.git">https://github.com/allegroai/clearml-server.git</a><br> #or<br>sudo curl <a href="https://raw.githubusercontent.com/allegroai/clearml-server/master/docker/docker-compose.yml">https://raw.githubusercontent.com/allegroai/clearml-server/master/docker/docker-compose.yml</a></blockquote><p>The docker-compose.yml which you will find in the sub-folder ‘docker’ or where you have downloaded it to, contains everything needed to instantiate the <em>ClearML</em>-server and all its dependencies like a MongoDB, a web server and others. It is a good idea, to copy the YML file it to /opt/clearml/.</p><p>Before you can proceed, you need to set following environment variables being used by <em>ClearML</em>. Replays the git relevant values with your personal to grant the server access to the repositories you make use of.</p><blockquote>export CLEARML_HOST_IP=127.0.0.1<br>export CLEARML_AGENT_GIT_USER=&lt;git_username_here&gt;<br>export CLEARML_AGENT_GIT_PASS=&lt;git_password_here&gt;</blockquote><p>If the host ip is not set, any request will be send to the public <em>ClearML</em>-server. If the git credentials are missing or incorrect, your experiments will not run. Warning messages in your shell will try to inform you if they are not set.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/609/1*aPR9LwwMgbj71R3FmshJqQ.png" /><figcaption>warnings of unset variables</figcaption></figure><p>Time for instantiating the server by:</p><blockquote>docker-compose -f /opt/clearml/docker-compose.yml up -d</blockquote><p>Open an browser and point it to localhost:8080</p><p>Done :) Quite easy isn’t it?</p><p>To get your experiments handled by your local <em>ClearML</em>-server you need to create credentials and enable your user account to make use of it. You will find the information on how to do this on the first article of my <em>ClearML</em> series.</p><p><a href="https://w-goutas.medium.com/track-your-experiments-with-clearml-b26b2d0d6518">Track your experiments with ClearML</a></p><p>To shutdown your instance call</p><blockquote>docker-compose -f /opt/clearml/docker-compose.yml down</blockquote><p><strong>agents</strong></p><p>How to configure and run an <em>ClearML</em> agent is part of my the first article to this series. Here I will show you how to run an agent inside a Docker container and how to run it manually.</p><p><strong>starting agents within the composition</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*I2MpgpmheVJjtMWT8kSitg.png" /></figure><p>The current <em>ClearML</em>-server set-up already contains an ‘service’ agent, which is been used by <em>ClearML</em> internally I guess. The agent instance is been configured in the yml file I already make use of.</p><p>In the docker-compose.yml file you will find a configuration section containing already an agent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/617/1*KGgkUvBtrt0xXWWcs66q8A.png" /></figure><p>I’m using the already available service configuration to add an agent handling the ‘default’ queue.</p><p>I adapted the service name, the image been used and the workers ID, reflecting that this is the default queue handler.</p><p>The Docker image I make use of, is been provided by the AllegroAI team as well. The Dockerfile used to build it is part of the <a href="https://github.com/allegroai/clearml-agent.git">clearml-agent Github repository</a>.</p><p>Running the docker-compose command to start the server with a yml file adapted like this, creates automatically an agent instance listening on the ‘default’ queue without the need to instantiate one manually or even set-up credentials :) (I expect this is because it uses the system credentials the server provides.)</p><p><strong>starting agents manually</strong></p><p>As I have two virtual private server hosted by a service provider, I want them to participate in my <em>ClearML</em> set-up, so I installed the clearml-agent on them and configured them with the credentials I created on my <em>ClearML</em>-server instance. As my <em>ClearML</em>-server installation is running in my home network I configured the router to forward any requests from outside to the ports 8080, 8081 and 8008 to my local PC running the dockerized <em>ClearML</em>-server. As my IP address is dynamic, I need to get an DNS entry been automatically updated on daily base to be able to configure the clearml-agent reaching my installation. Fortunately my router (FRITZ!Box) is been able to get reached by an DNS service of its manufacturer, otherwise I would need to open an account by an Dynamic DNS provider like no-ip.com.</p><p>Once the VPS systems are configured with the credentials of my server,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*rTSqEloCoQiIJp_FXXQXmw.png" /></figure><p>I run the following command on each of them</p><blockquote>clearml-agent daemon --cpu-only --queue cpu_work_queue --create-queue -d</blockquote><p>which enables me to enqueue experiments into the newly created (if not already existent) queue named ‘cpu_worker_queue’. As they do not have any CUDA enabled GPU I added the parameter ‘--cpu_only’, otherwise I would add ‘--gpus all’ and maybe also a docker container to be used for processing the queue work. For configuration options check the <a href="https://allegro.ai/clearml/docs/docs/deploying_clearml/clearml_agent_install_configure.html#adding-clearml-agent-to-a-configuration-file">official documentation pages</a> and/or run the agent with --help ;)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K_IRa5pjJihvBV-sHJ_rSg.png" /><figcaption>multiple workers service different queues</figcaption></figure><p><strong>getting support</strong></p><p>In case of support needs, there is — besides commercial support — also free support available on the <em>ClearML</em> <a href="https://join.slack.com/t/clearml/shared_invite/zt-c0t13pty-aVUZZW1TSSSg2vyIGVPBhg">Slack Channel</a> where I made good experience with the very responsive team.</p><p>Thank you guys for answering all my questions :)</p><h3>Summary</h3><p>In this story, I hopefully was able to show you how to get <em>ClearML</em> running in a Docker environment, run agents withing the same docker composition and agents stared manually.</p><p>Thank you for reading.</p><blockquote><strong><em>My name is Wasilios Goutas, I’m Dipl. Ing. techn. Informatik (FH) which I studied in my home town Hamburg, Germany. I’m experienced software project manager in the automotive and semiconductor industries. In my private life I’m making use of AI libraries like Keras &amp; Tensorflow to learn more about the technology which will play a significant role in tomorrows world.</em></strong></blockquote><blockquote><strong><em>Feel free to contact me on </em></strong><a href="http://www.linkedin.com/in/wgoutas"><strong><em>LinkedIn</em></strong></a><strong><em>.</em></strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37c5bdb3c582" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Track Your Experiments With ClearML]]></title>
            <link>https://medium.com/swlh/track-your-experiments-with-clearml-b26b2d0d6518?source=rss-4e1b78bd21ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/b26b2d0d6518</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Wasilios Goutas]]></dc:creator>
            <pubDate>Sun, 17 Jan 2021 21:00:29 GMT</pubDate>
            <atom:updated>2021-01-24T17:21:37.611Z</atom:updated>
            <content:encoded><![CDATA[<p>Do you remember the history of your ML experiments?</p><p>Would you like to be able to do so with only 2 lines of code?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ANURgfCAQfvbrOREdSE_ew.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@tents_and_tread?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Thomas Tucker</a> on <a href="https://unsplash.com/s/photos/sequence?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>In simple words, the work of a Data Scientist includes implementing, performing, analyzing, comparing, optimizing, etc. tasks handling big amount of data trying to generate models usable for classification, clustering or prediction.</p><p>Doing this generates output in form of logs, graphics, metrics, etc. of different format. The code itself is changing continuously, as the processing pipeline is improving and/or different ideas are been implemented. Every change in code results in running a new experiment generating new results, which will be better or worse than before. If you are continuously improving your process without leaving the path by experimenting with e.g. different reprocessing steps, modelling frameworks, etc. than it might be sufficient to take care that your changes are just under source control. In the other case, you might want to be able to compare experiments, being able to rerun an older experiment with changed parameter, get all output generated by any experiment in the past and more. If your experiments are implemented in Python you should proceed reading.</p><p>In this article I want you to introduce you to the <strong>ClearML</strong> framework formally known as <em>Allegro Trains</em>. It takes care about storing anything related to your experiments by adding just 2 lines of code.</p><p><strong>ClearML-server</strong></p><p>The <em>ClearML</em>-server is been connected when running your Python script which has been enhanced by just 2 lines of code. This server can be the service provided by the Allegro team, an local (Docker image) or remote (Kubernetes) installation. In this article I will show you the first where upcoming articles are planned to show the later two options. An additional article is planned to show you the Kubernets deployment of the <em>ClearML</em>-server.</p><p><strong>Use the free service</strong></p><p>To enable the client you are going to install and configure later you need to register an account on an <em>ClearML</em>-server. Do so on <a href="https://app.community.clear.ml/">https://app.community.clear.ml/</a> and open your profile to generate an access key for the <em>ClearML</em>-client to enable it to publish your experiment to this server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZrGHdAmx9_YZMSXqt7sfkQ.png" /><figcaption>my profile on the ClearML-server</figcaption></figure><p>Create new credentials and copy them to clipboard as you will need them on your local machine in the configuration of the <em>ClearML</em>-client step.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/753/1*jnap_O6dhV8NdlPV6Kz7jA.png" /><figcaption>generated credentials needed by the ClearML-client</figcaption></figure><p><strong>Install the Clear-ML client</strong></p><p>On Python 2 I faced issues running the upcoming commands, so I recommend to use Python 3.</p><p>As usual in Python you get what you need by a single command. To install the <em>ClearML</em>-client run</p><blockquote>pip install clearml</blockquote><p>and run the configuration step by</p><blockquote>clearml-init</blockquote><p>Past the credential you copied earlier from the <em>ClearML</em>-server and confirm the defaults of the next settings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1018/1*SwzJUKY3rWRRuSuPJK6Qbw.png" /><figcaption>configure the ClearML-client</figcaption></figure><p>This writes the <em>clearml.conf</em> file to your home directory which enables the client to store anything related to your experiment in your workspace of the server.</p><p><strong>making use of it</strong></p><p>As mentioned you need to add only 2 line of code to your Python code which are the import statement and the initialization of your client instance. To demonstrate it I added just a print statement and run it as shown here</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1003/1*8R9m_wIjFALfhF5f0FY02A.png" /><figcaption>first step with ClearML</figcaption></figure><p>Running this script prints not only the scripts print statement, but in addition the information about the generated task id on the <em>ClearML</em> server and the link to the experiment. You do not need to remember this link. Just open the dashboard on the <em>ClearML</em> server and you will notice, that a new project has been added and the top most experiment is the last you started.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*veVnMil49exns4_eOHMdnQ.png" /><figcaption>dashboard of my account on the freely available server</figcaption></figure><p>For any reason the experiment is marked to be in the state ‘Running’ even it is finished. Beside your own projects on your dashboard you will find an additional project call ‘ClearML Examples’ which demonstrates different feature provided by <em>ClearML</em>.</p><p><em>ClearML</em> provided everything needed to the server to re-run the example by — in this case — copying the complete script to the server. If I would had used git as source repository the path to the repository, the commit ID and the uncommitted changes would have been stored.</p><p>Selecting an experiment to review all of its attributes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-86GLyPCbTqheWqs1yb6fw.png" /><figcaption>uncommitted code is been show here</figcaption></figure><p><strong>Properties of experiments</strong></p><p>Having a history of the experiments done is nice, but <em>ClearML</em> support a lot more. I will show you soon how to take an experiment stored on the server and re-run it. You might ask what should it be good for to re-run the same code as done already once in the past without modifying any parameter, and you would be right. You can re-execute an experiment with change parameters, as long as you have defined them. What <em>ClearML</em> does out of the box is to enable you changing settings been handled in your code as command line parameter parsed by the <em>argparse</em> lib. Known arguments to the parser will be shown in the configurations tab and can be adapted for an re-execution. I created an example to demonstrate this by supporting the argument</p><blockquote>--symbol</blockquote><pre>parser.add_argument(&#39;--symbol&#39;, help=&#39;symbol used for regression&#39;, default=&#39;AAPL&#39;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*7oZeYJ0DQ31wOw2WMBoQ8Q.png" /><figcaption>list arguments adaptable when re-execute the experiment</figcaption></figure><p><em>ClearML</em> supports also dictionaries as an additional way to define experiment parameters. Therefore you need to make it known by calling a framework function like in the following example code</p><pre>parameters = task.connect_configuration(<br>                     configuration=parameters, <br>                     name=&#39;regressor selection&#39;,<br>                     description=&#39;set which regressor to run&#39;)</pre><p>Such dictionary appears in the configuration section on the server as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*1sRo7L67cVql_AWEK6IiLA.png" /><figcaption>dictionary parameters of the experiment</figcaption></figure><p><strong>Dashboard</strong></p><p>Your dashboard on the <em>ClearML</em>-server gives you an overview on the projects you are working on and shows you a list with the last experiments run. The ‘ClearML Examples’ project includes the examples you will find on the GitHub repository of <a href="https://github.com/allegroai/clearml"><em>ClearML</em></a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AK3GmsSaopRyZ2uZZEZllw.png" /><figcaption>authors dashboard</figcaption></figure><p><strong>cloning &amp; queuing</strong></p><p>As the setup provides the user with a lot of example experiments you can directly jump to one of it and gain some experience with the possibilities of the <em>ClearML</em>-server. You can also get a copy of the code I’m referring to available in <a href="https://github.com/laiki/ClearML_playground">my GitHub repository</a>.</p><p>From my project I open the ‘finance’ task and from the menu on the upper right side I choose ‘Clone’</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KBrGa7L5PDwxOZEkWwZc7g.png" /><figcaption>cloning an experiment</figcaption></figure><p>An window will pop up where you can edit the name of the experiment and add an describing text. Once the clone has been created, it becomes part of the experiment list and is in the state ‘draft’ and you can edit the configuration parameter I showed you earlier. I’m going to set all entries of my configuration dictionary to ‘True’ which shall result in creation of 3 types of regressors and visualizing their prediction results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sbkdcUIhitLaTAkhPEBZlw.png" /><figcaption>adapted configuration parameters</figcaption></figure><p>Now it is time to add the experiment to a workers queue (I will come shortly to what this is) so it can be processed by an available agent checking this queue periodically. Enqueuing is available in the menu where you have called the clone function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bnSc-x0ZKXYCewHVJ1yfAQ.png" /><figcaption>enqueue an experiment</figcaption></figure><p>You will be asked to which queue you want this task to be added. At the beginning there is only the ‘default’ queue as we haven’t created other queues, so I used this.</p><p>The state of the experiment is switching to ‘pending’ and will sty there until you add an agent to handle the ‘default’ queue.</p><p><strong>Agent registration &amp; queues</strong></p><p>To run an experiment you need a CPU. The <em>ClearML</em>-server is not providing additional CPU resource to run your Python code of your cloned experiment, as it didn’t for the original experiment you run on your local machine.</p><p>Here comes the “Agent” into the game. The agent needs to be installed</p><blockquote>pip install clearml-agent</blockquote><p>and configured on the machine you want it to run. The agent needs an clearml.conf file in your home directory which contains different configuration sections as the one used by the developer.</p><p>In case you are going to use a <strong>different user account</strong> from the one you used during development, you just need to generate additional credentials on the <em>ClearML</em>-server and use them while running the command</p><blockquote>clearml-agent init</blockquote><p>You will be asked also to enter your git credentials so the agent will be able to clone the repositories it is going to run.</p><p>The clearml.conf file shall be able to be used on any machine / user you want to act as agent. As more machines you add as more parallel execution of tasks (not only cloned once) can be performed.</p><p>In case you want to run the agent from an account having already a clearml.conf file created, you will need to edit the configuration and add an agent configuration section to it as described in the <a href="https://allegro.ai/clearml/docs/docs/deploying_clearml/clearml_agent_install_configure.html#adding-clearml-agent-to-a-configuration-file">Allegro.ai documentation</a>.</p><p>Finally you need to run the agent tool and provide it parameters like the queue is shall handle, in my case the ‘default’ queue. The agent can be called also without the option to listen on a specific queue but to run an experiment from the server. The supported parameters can be found on the <a href="https://allegro.ai/clearml/docs/docs/references/clearml_agent_ref.html?highlight=clearml%20agent#daemon">documentation page</a> of Allegro.ai. This is the command I use to dequeue from the ‘default’ queue by enabling also all GPUs of my system even for this example they are not used:</p><blockquote>clearml-agent daemon --queue default --gpus all</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1018/1*xA0bnR9XaNB_J2CgC2ARSQ.png" /><figcaption>running agent dequeing a task</figcaption></figure><p>Some seconds after starting the agent the enqueued task is been processed. The repository is been fetched, all dependencies are tried to be satisfied by installing the used python packages into an virtual environment and the script is been executed.</p><p>As Plotly tries to open a browser which fails for the user I’m using to run the agent, the experiment failed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zwvMfiup84bOWQg1h7T9WA.png" /><figcaption>failing dequeued experiment due to unsatisfied Plotly dependency</figcaption></figure><p>After resetting the failed experiment, adapting the experiment to prevent showing the plot if the task is not running locally, run and clone it, the task finally gets processed :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V-WPLs_jXGdiWSiolskM9Q.png" /><figcaption>cloned experiment re-executed by an agent</figcaption></figure><h3>Summary</h3><p>In this story I hopefully was able to provide you a short introduction to <em>ClearML</em>.</p><p>I just touched the top of the iceberg and there is a lot more to discover like comparing experiments, and more.</p><p>Thank you for reading.</p><blockquote><strong>My name is Wasilios Goutas, I’m Dipl. Ing. techn. Informatik (FH) which I studied in my home town Hamburg, Germany. I’m experienced software project manager in the automotive and semiconductor industries. In my private life I’m making use of AI libraries like Keras &amp; Tensorflow to learn more about the technology which will play a significant role in tomorrows world.</strong></blockquote><blockquote><strong>Feel free to contact me on </strong><a href="http://www.linkedin.com/in/wgoutas"><strong>LinkedIn</strong></a><strong>.</strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b26b2d0d6518" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/track-your-experiments-with-clearml-b26b2d0d6518">Track Your Experiments With ClearML</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Run Windows & Linux simultaneous]]></title>
            <link>https://w-goutas.medium.com/run-windows-linux-simultaneous-56d42d33bfc7?source=rss-4e1b78bd21ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/56d42d33bfc7</guid>
            <category><![CDATA[virtualization]]></category>
            <category><![CDATA[linux-on-windows]]></category>
            <category><![CDATA[gnome-desktop]]></category>
            <category><![CDATA[wsl-2]]></category>
            <dc:creator><![CDATA[Wasilios Goutas]]></dc:creator>
            <pubDate>Tue, 22 Dec 2020 12:33:19 GMT</pubDate>
            <atom:updated>2021-01-24T17:22:39.130Z</atom:updated>
            <cc:license>https://creativecommons.org/publicdomain/mark/1.0/</cc:license>
            <content:encoded><![CDATA[<p>Recently I read about the Windows Subsystem for Linux in version 2 where I even did not know about it in version 1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*X978K0qLYI7VxuLk5sx5Iw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@timmossholder?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Tim Mossholder</a> on <a href="https://unsplash.com/s/photos/together?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>As the most people I’m working in my business life on Windows. I’m a fan of all the MS Office tools, but as I’m using Linux on my private system which I don’t want to miss any more, MS Office was not available for my in private life. When I heard about WSL I knew I will need to give it a try and when I finished setting up my system, I was excited like the first time I got in touch with VMWare in the late 90s.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x8NcaNXdR7PiG0DYxVgbMA.png" /><figcaption>GNOME in Windows</figcaption></figure><p>This article (by the way, it is my first:) shall assist you to get Ubuntu running on your Windows host (which is really not a big thing) and get even the GNOME desktop running so you will be able to use the complete world of Linux tools &amp; programs without the need of additional SW installations to simulate hardware.</p><h3>Get WSL</h3><p>To get WSL you need to register to <a href="https://insider.windows.com/en-us/getting-started">‘Windows Insider’</a> program. Once you are registered, you can proceed with ‘<em>Start flighting</em>’ which is the second tab on the page you are able to enter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/1*qYv1_OMEQXrFZ3ltjYKOAg.png" /><figcaption><a href="https://insider.windows.com/en-us/getting-started">https://insider.windows.com/en-us/getting-started</a></figcaption></figure><p>Basically it provides you theses steps</p><ol><li>Go to <strong>Settings</strong> &gt; <strong>Update &amp; Security</strong> &gt; <strong>Windows Insider Program</strong> on your Windows 10 device. (You must be an administrator on your device to see this setting.)</li><li>Select the <strong>Get Started</strong> button. Under <strong>Pick an account to get started</strong>, select <strong>+</strong> to connect the Microsoft account you registered with and continue.</li><li>Follow the directions on your screen to choose the experience and channel you’d like to get Insider Preview builds through. (Not sure which channel to choose? <a href="https://insider.windows.com/understand-flighting">Learn more about channels.</a>)</li><li>Review the Privacy Statement and program terms, confirm, and choose <strong>Restart Now</strong> or <strong>Restart Later</strong> to finish setting up your device.</li><li>Once your device restarts, <a href="https://docs.microsoft.com/windows-insider/data-settings">make sure your data settings are set to the right level</a>, so you can receive preview builds.</li><li>Once you’ve set your data settings, go to <strong>Settings</strong> &gt; <strong>Update &amp; Security</strong> &gt; <strong>Windows Update</strong> and select the <strong>Check for updates</strong> button to download the latest Insider Preview build based on the settings you chose. Your device will update like it normally would with a Windows update.</li><li><a href="https://blogs.windows.com/windows-insider/">Read our flight blog posts</a> to learn more about what’s in your Insider Preview build.</li></ol><p>Now you need to open the settings of the Windows-Insider-Program</p><p>You will find it in Settings -&gt; updates and security -&gt; Windows-Insider-Program</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/250/1*wh73DeMct_YJ1Nsv1JS41w.png" /><figcaption>German representation of updates and security</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/254/1*vn1YP9e3JbIioOHN3sxGeg.png" /><figcaption>German representation of Windows-Insider-Program</figcaption></figure><h3>WSL settings</h3><p>Now let’s set some settings. I did the listed commands in a PowerShell with administrator privileges following the instruction found on <a href="https://docs.microsoft.com/en-us/windows/wsl/install-win10">this </a>link.</p><p>Step 1 — Enable the Windows Subsystem for Linux</p><blockquote>dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart</blockquote><p>Step 2 — Update to WSL 2</p><p>You need to run an up to date Windows version so check if you need an update by Settings -&gt; “Update &amp; Security” -&gt; “Check for Update”</p><p>Step 3 — Enable Virtual Machine feature</p><blockquote>dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart</blockquote><p>Step 4 — Download the Linux kernel update package</p><p>download &amp; run the update from <a href="https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi">this </a>side (link is for x64 machines).</p><p>Step 5 — Set WSL 2 as your default version</p><blockquote>wsl --set-default-version 2</blockquote><p>Step 6 — Install your Linux distribution of choice</p><h3>Install Ubuntu</h3><p>Open the <a href="https://aka.ms/wslstore">Microsoft Store</a> and select your favorite Linux distribution.</p><p>The upcoming instruction assume that you install Ubuntu 20.04 as I did.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/977/1*TBb-iAj_fAU_4rJXH51whg.png" /><figcaption>Ubuntu 20.04 running in Windows Subsystem for Linux</figcaption></figure><h3>Network issues?</h3><p>Once you have installed it, check if you can use the network. A simple ping google.com should be sufficient. I had problems getting any network traffic and searched the Internet for solutions. Finally the solution I <a href="https://github.com/microsoft/WSL/issues/5437">found</a> was to compress the Windows users temp folder. I have no explanation on why it helped, but it worked. So on a command window run</p><blockquote>compact /C %temp% /i /Q</blockquote><h3>Update Ubuntu</h3><p>Once Ubuntu is running and your network connection is functional you should update it by running</p><blockquote>sudo apt-get update &amp;&amp; sudo apt-get -y upgrade</blockquote><h3>GNOME installation &amp; environment variables</h3><p>Now it’s time for installing the graphics desktop environment GNOME by this one liner</p><blockquote>sudo apt install -y ubuntu-desktop gnome</blockquote><p>As you will need to redirect the graphics output to the Xserver you are going to install soon, you will need to set two environment variables. A good way to do this is by adding the following lines to the Linux users .bashrc</p><blockquote>export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk ‘{print $2}’):0</blockquote><blockquote>export LIBGL_ALWAYS_INDIRECT=1</blockquote><p>Use the editor you like to edit the file e.g. by</p><blockquote>nano ~/.bashrc</blockquote><p>alternatively you can use these two lines to add them at the end of the file.</p><blockquote>echo “export DISPLAY=\$(cat /etc/resolv.conf | grep nameserver | awk ‘{print \$2}’):0” &gt;&gt; ~/.bashrc</blockquote><blockquote>export LIBGL_ALWAYS_INDIRECT=1</blockquote><p>The difference in the first expression is the escaped $.</p><h3>XServer installation</h3><p>Time to install an XServer on Windows. I will refer to two free versions</p><ol><li>xlaunch installable through <a href="http://cygwin.com/">Cygwin</a></li><li>VcXsrv available on <a href="https://sourceforge.net/projects/vcxsrv/">SourgeForge</a></li></ol><p>It seems both X servers are based on the same code as they look identical. The only difference I have seen is the default display number which is -1 on VcXsrv and can not be set to that in the Cygwin version.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/497/1*wIKW9rVVRS9EjJhW0novDw.png" /><figcaption>X server running on Windows</figcaption></figure><p>Install one of the above or any other XServer you want to make use of.</p><p>Click next till you reach the option to ‘Disable access control’ which you need to enable to allow your Linux system to redirect its output to it. For a list of XServer command line options you might want to refer to its <a href="https://x.cygwin.com/docs/man1/Xserver.1.html">manual page</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*1vGkctpcLQFUUEjFjwrKXA.png" /><figcaption>disable access control in the extra settings</figcaption></figure><p>Finalize the configuration step so the XServer starts waiting for client connections.</p><h3><em>…the fail whale is dead</em></h3><p>If you will try to start the gnome session now, you will still get error messages reported like</p><p><em>gnome-session-binary[22]: CRITICAL: We failed, but the fail whale is dead. Sorry….</em></p><h3>systemd support</h3><p>To fix this you will need to clone a repository from GitHub.com and run the script it contains. This enables the <em>systemd </em>support Linux needed for GNOME.</p><p>Install git and clone the repository needed.</p><blockquote>sudo apt-get install -y git</blockquote><blockquote>git clone <a href="https://github.com/DamionGans/ubuntu-wsl2-systemd-script.git">https://github.com/DamionGans/ubuntu-wsl2-systemd-script.git</a></blockquote><p>This will result in getting a folder including three scripts where you will need to run the ubuntu-wsl2-systemd-script.sh</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/455/1*8XHIgVVPVBPFBX1IPVnRnA.png" /></figure><blockquote>cd ubuntu-wsl2-systemd-script/</blockquote><blockquote>./ubuntu-wsl2-systemd-script.sh</blockquote><p>You should see a success message at the end. On my system it is in German language and looks like this</p><p><em>ERFOLGREICH: Angegebener Wert wurde gespeichert.</em></p><p>Now it’s time to restart Linux. Open a command window or PowerShell and enter</p><blockquote>wsl — shutdown</blockquote><p>Re-start it opening it from the Windows start menu.</p><h3>the GNOME session</h3><p>The preparations finished. You are ready to run the GNOME desktop environment. Start it by calling</p><blockquote>gnome-session &amp;</blockquote><p>by adding an ‘&amp;’ you will be able to continue using the Ubuntu shell while running the gnome session in background.</p><p>Voila, there it is. The first time you will run through the initial setup :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a55vYrD4Mju98zdbJoQreA.png" /></figure><p>Once you have done this you should see the success message like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j6OxEojxgPEvFUO7eXfp2Q.png" /></figure><p>Click on ‘Start using Ubuntu’ and enjoy running Windows and Linux desktops in parallel.</p><h3>how to close it</h3><p>To close the gnome-session making use of the gnome-session menu ‘Lock Out’ or ‘Power Off’ did not worked for me. I recommend to close the XServer in Windows. A double click on the X icon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/197/1*ezzqy6LyQFRqmGPgRC2TqQ.png" /></figure><p>opens the ‘Exit’ dialog as well</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/271/1*UNnAazJ5n0PwVhJLIITc1A.png" /></figure><h3>openSuse &amp; KDE</h3><p>For an use of OpenSuse and KDE install openSUSE Leap 15.2 from the Microsoft store.</p><p>To get KDE installed run the command</p><blockquote>sudo zypper install -t pattern kde kde_plasma</blockquote><p>As on Ubuntu you need to</p><p>To install the editor <em>nano </em>run the command</p><blockquote>sudo zypper install nano</blockquote><p>Edit ~/.bashrc and add the statement</p><blockquote>export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk ‘{print $2}’):0</blockquote><p>On Windows start the XServer as desciped above.</p><h3>how to start XLaunch</h3><p>I would like to inform you, that I got connection errors when I opened the XServer by clicking on its icons I pinned to the task bar. It seems doing so runs it with the default settings which do not disable access control so it prevents any host from connecting to the server. For sure there is a way to provide parameters to the pinned XLaunch icon, but I assume WSL will not assign always the same IP address to the Linux installation, so getting the XServer configured to enable only the WSL instance to connect to seems to be a challenge. So prevent pinning the XServer to your task bar and open it via the Windows start menu.</p><h3>Summary</h3><p>In this story I hopefully was able to provide you a complete list of needed steps to get Ubuntu &amp; its standard desktop environment running in Windows.</p><p>Although the installation process is straight forward till you get a shell running, the main challenge is the get the desktop environment running and redirected to your host.</p><p>I hope this article was helpful and would like to thank you for reading it.</p><h3>Summary</h3><p>In this story I hopefully was able to provide you a short introduction to <em>ClearML</em>.</p><p>I just touched the top of the iceberg and there is a lot more to discover like comparing experiments, and more.</p><p>Thank you for reading.</p><blockquote><strong><em>My name is Wasilios Goutas, I’m Dipl. Ing. techn. Informatik (FH) which I studied in my home town Hamburg, Germany. I’m experienced software project manager in the automotive and semiconductor industries. In my private life I’m making use of AI libraries like Keras &amp; Tensorflow to learn more about the technology which will play a significant role in tomorrows world.</em></strong></blockquote><blockquote><strong><em>Feel free to contact me on </em></strong><a href="http://www.linkedin.com/in/wgoutas"><strong><em>LinkedIn</em></strong></a><strong><em>.</em></strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56d42d33bfc7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>