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

<channel>
	<title>guide Archives - Nerd Corner</title>
	<atom:link href="https://nerd-corner.com/tag/guide/feed/" rel="self" type="application/rss+xml" />
	<link>https://nerd-corner.com/tag/guide/</link>
	<description>Craft your dreams!</description>
	<lastBuildDate>Tue, 19 Aug 2025 16:23:11 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>

<image>
	<url>https://nerd-corner.com/wp-content/uploads/2019/10/cropped-LogoNerdCorner-2-32x32.png</url>
	<title>guide Archives - Nerd Corner</title>
	<link>https://nerd-corner.com/tag/guide/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>DIY solar panel mount for 2W panels</title>
		<link>https://nerd-corner.com/diy-solar-panel-mount-for-2w-panels/</link>
					<comments>https://nerd-corner.com/diy-solar-panel-mount-for-2w-panels/#respond</comments>
		
		<dc:creator><![CDATA[Nerds]]></dc:creator>
		<pubDate>Sun, 22 Jun 2025 17:57:13 +0000</pubDate>
				<category><![CDATA[Handcrafted]]></category>
		<category><![CDATA[SolidWorks]]></category>
		<category><![CDATA[2W solar panel]]></category>
		<category><![CDATA[3D print]]></category>
		<category><![CDATA[CAD]]></category>
		<category><![CDATA[CAD design]]></category>
		<category><![CDATA[case]]></category>
		<category><![CDATA[DIY]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[mount]]></category>
		<category><![CDATA[mounting system]]></category>
		<category><![CDATA[Solar panel]]></category>
		<category><![CDATA[Solid Works]]></category>
		<category><![CDATA[Step by step guide]]></category>
		<category><![CDATA[STL]]></category>
		<guid isPermaLink="false">https://nerd-corner.com/de/?p=1727</guid>

					<description><![CDATA[<p>Often you don&#8217;t need a large power source to reliably charge an 18650 battery. Unfortunately, suitable, small solar panels are difficult to find &#8211; many &#8230; </p>
<p>The post <a href="https://nerd-corner.com/diy-solar-panel-mount-for-2w-panels/">DIY solar panel mount for 2W panels</a> appeared first on <a href="https://nerd-corner.com">Nerd Corner</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Often you don&#8217;t need a large power source to reliably charge an 18650 battery. Unfortunately, suitable, small solar panels are difficult to find &#8211; many are polycrystalline, have no housing or are merely laminated and fitted with simple eyelets for fastening. However, this is rarely ideal for stable and weatherproof outdoor installation. If you want a clean, durable installation, you need a robust housing with an adjustable bracket. For my outdoor applications, an output of around 1.5 watts is usually sufficient &#8211; a monocrystalline 2-watt panel with a corresponding solar panel mount is exactly the right choice.<i></i></p>
<p data-start="155" data-end="778"><img fetchpriority="high" decoding="async" class="zoooom aligncenter wp-image-1714" src="https://nerd-corner.com/wp-content/uploads/2025/06/solarpanel-stand.jpg" alt="" width="716" height="800" srcset="https://nerd-corner.com/wp-content/uploads/2025/06/solarpanel-stand.jpg 1393w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanel-stand-268x300.jpg 268w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanel-stand-916x1024.jpg 916w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanel-stand-768x858.jpg 768w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanel-stand-1374x1536.jpg 1374w" sizes="(max-width: 716px) 100vw, 716px" /></p>
<p data-start="155" data-end="778"><em><strong>This might also be interesting for you: </strong><a href="https://nerd-corner.com/diy-powerbank-with-voltage-regulator-and-voltmeter/">Do it yourself powerbank with voltage regulator and voltmeter</a></em></p>
<h2>Planning and choice of material</h2>
<p>Before I start building, I first think about where the solar panels should be mounted: One on the garden shed, two on the balcony railing and one on the weather station mast.</p>
<p>The garden shed has a straight wooden wall, which makes a flat bracket necessary. The balcony railing and the mast, on the other hand, each have a diameter of 30 mm &#8211; a bracket with a rounding is required here. So I currently need two different types of mounting.</p>
<p>I use a monocrystalline 2-watt module with an output voltage of around 6 V as the solar panel (see Figure 1.0.1). For the electrical connection to the panel, I opted for a standard 5.5×2.1 mm hollow socket (see Fig. 1.0.2). Cables and screws are not included in the illustration as they may vary depending on the application. The panels are available in packs of five or ten from various online retailers. Their dimensions are 120 × 110 mm (length × width), whereby the height can vary between 1.3 mm and 1.8 mm.<i></i></p>
<p><img decoding="async" class="aligncenter wp-image-1713 zoooom" src="https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter1.jpg" alt="" width="2276" height="1330" srcset="https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter1.jpg 2279w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter1-300x175.jpg 300w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter1-1024x598.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter1-768x449.jpg 768w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter1-1536x898.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter1-2048x1197.jpg 2048w" sizes="(max-width: 2276px) 100vw, 2276px" /></p>
<h2>Construction of the housing</h2>
<p>The central component for the solar panel mount is the frame. It provides both the stability and the sealing function of the housing. The frame must be torsion-resistant, be able to accommodate all the necessary threads and still remain compact. The solar panel is pressed into its seat from behind with strips so that it is tightly sealed at the front.<br />
Several screws are required to create an even contact pressure (see Figure 2.0.1).</p>
<p>There is a cover on the back (Fig. 2.0.2), which is reinforced in an X shape for stability. This cover also accommodates the hollow bushing (5.5 × 2.1 mm), which is later attached with a small bridge. One of the four pressure bars that press the panel into the frame can be seen in Figure 2.0.3. The joint holder (Fig. 2.0.4) is used to attach the panel to railings or walls. This serves as a holder for the retaining lever, which holds the housing securely in place and allows flexible alignment.</p>
<h2 data-start="175" data-end="204"><img decoding="async" class="aligncenter wp-image-1712 zoooom" style="font-family: 'Source Sans Pro', Graphik, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif; font-size: 1.125rem;" src="https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter2.jpg" alt="" width="2265" height="1320" srcset="https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter2.jpg 2277w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter2-300x175.jpg 300w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter2-1024x597.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter2-768x448.jpg 768w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter2-1536x895.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter2-2048x1194.jpg 2048w" sizes="(max-width: 2265px) 100vw, 2265px" /></h2>
<p>Figure 2.1.1 shows the holding arm for railing attachment with a 30 mm diameter at the end. The counterpart for the holder can be seen in Fig. 2.1.2. The bridge (Fig. 2.1.3) for attaching the hollow bushing to the cover.</p>
<p><img loading="lazy" decoding="async" class="zoooom aligncenter wp-image-1711" src="https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter2-1.jpg" alt="Solarpanelhalterung CAD Teile" width="2276" height="1330" srcset="https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter2-1.jpg 2279w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter2-1-300x175.jpg 300w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter2-1-1024x598.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter2-1-768x449.jpg 768w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter2-1-1536x898.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter2-1-2048x1197.jpg 2048w" sizes="auto, (max-width: 2276px) 100vw, 2276px" /></p>
<h2>3D printing of the components</h2>
<p>For 3D printing, I chose the following print orientations for the Prusa MK4 (see Figures 3.0.1 and 3.0.2).<br />
Particularly important: The bar must of course be printed four times, as it is used on all four sides of the solar panel.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1710 zoooom" src="https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter3.jpg" alt="" width="2265" height="1320" srcset="https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter3.jpg 2277w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter3-300x175.jpg 300w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter3-1024x597.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter3-768x448.jpg 768w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter3-1536x895.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter3-2048x1194.jpg 2048w" sizes="auto, (max-width: 2265px) 100vw, 2265px" /></p>
<h3>Thread cutting</h3>
<p>Now let&#8217;s move on to my favorite activity: thread cutting. Admittedly, there is a lot to do in the frame (see Figure 3.1.1): The green markings indicate 12× M3 threads, the yellow ones 4× M3 threads.</p>
<p>There is an alternative version of the frame for those who are not the biggest fans of thread cutting. This is equipped with slots to accommodate normal M3 nuts. The matching file is called: Deckel110x120_V1-2.stl (see Figure 3.1.3).<br />
The recesses for the nuts are also clearly visible in Figures 3.1.4 and 3.1.5.</p>
<p>On the back cover (Figure 3.1.2), however, the cutting of threads can hardly be avoided: 3× M3 threads and 2× M2 threads are required here.<br />
Alternatively, self-tapping screws can also be used &#8211; this saves tools and time.</p>
<h3 data-start="162" data-end="406"><img loading="lazy" decoding="async" class="aligncenter wp-image-1709 zoooom" style="font-family: 'Source Sans Pro', Graphik, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif; font-size: 1.125rem;" src="https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter3-1.jpg" alt="" width="2276" height="1330" srcset="https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter3-1.jpg 2279w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter3-1-300x175.jpg 300w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter3-1-1024x598.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter3-1-768x449.jpg 768w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter3-1-1536x898.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter3-1-2048x1197.jpg 2048w" sizes="auto, (max-width: 2276px) 100vw, 2276px" /></h3>
<h2>Soldering and assembly</h2>
<p>Once all 3D printed parts have been cleaned and threaded, the solar panel can be connected and soldered.</p>
<h3>Electrical connections</h3>
<p>The first hurdle is to find out where the positive pole is located on the panel.<br />
There are only two soldering lugs on the back of the solar panel, but no labeling &#8211; so: plus or minus? To determine this quickly and clearly, we need a multimeter. If we set it to measure direct voltage (DC), it helps us to recognize the polarity.</p>
<p>Figure 4.0.1: The red wire (positive) of the multimeter is connected to one of the soldering lugs, the black wire (negative) to the other. If a minus sign appears in front of the measured value on the display, this means that the red wire is connected to the negative terminal &#8211; i.e. the opposite tab is the positive terminal of the solar panel.</p>
<p>Figure 4.0.2 shows the reverse configuration: the red wire is connected to the positive pole of the panel, the black wire to the negative pole. In this case, no minus sign appears in the display &#8211; the polarity is correct,<br />
and we now know for sure where the positive pole of the solar panel is.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1708 zoooom" src="https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4.jpg" alt="" width="2265" height="1320" srcset="https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4.jpg 2277w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-300x175.jpg 300w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-1024x597.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-768x448.jpg 768w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-1536x895.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-2048x1194.jpg 2048w" sizes="auto, (max-width: 2265px) 100vw, 2265px" /></p>
<p>The hollow socket is now soldered to the solar panel. Figure 4.1.1 clearly shows which connections need to be connected.<br />
Figure 4.1.2 shows the finished soldering in the installed state.</p>
<p>I have also soldered a diode to the positive pole of the hollow socket (see Fig. 4.1.3).<br />
This protects against reverse current: if the connected load does not have its own protective diode, the solar panel would draw energy from the battery in the dark &#8211; and unintentionally work as a heater.</p>
<p>A typical example:<br />
If a charge controller does not have an integrated diode, the battery can discharge the panel backwards in the absence of sunlight.</p>
<p>The installation direction of the diode is crucial so that the current can only flow in one direction.</p>
<p data-start="79" data-end="137"><img loading="lazy" decoding="async" class="aligncenter wp-image-1707 zoooom" style="font-size: 1.125rem;" src="https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-1.jpg" alt="" width="2276" height="1330" srcset="https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-1.jpg 2279w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-1-300x175.jpg 300w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-1-1024x598.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-1-768x449.jpg 768w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-1-1536x898.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-1-2048x1197.jpg 2048w" sizes="auto, (max-width: 2276px) 100vw, 2276px" /></p>
<h3>Mounting the hollow bushing and inserting the panel</h3>
<p>The installation of the soldered hollow bushing on the retaining bridge is shown in Figure 4.2.1.<br />
The hollow bushing is pushed into the large opening of the retaining bridge until the thread protrudes on the other side. The nut is then placed on the thread and tightened &#8211; the result is shown in Figure 4.2.2. The solar panel is now inserted into the retaining seat of the frame (see Figure 4.2.3, red frame).<br />
If you want to increase the tightness, you can apply some elastic adhesive evenly to the seat before inserting the panel. Once the solar panel is correctly seated, the first strip is placed in position and lightly tightened with a screw in the middle (see Figure 4.2.4, magenta circle). A side view is shown in Figure 4.2.5 to illustrate this.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1706 zoooom" src="https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-2.jpg" alt="" width="2264" height="1320" srcset="https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-2.jpg 2278w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-2-300x175.jpg 300w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-2-1024x597.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-2-768x448.jpg 768w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-2-1536x895.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-2-2048x1194.jpg 2048w" sizes="auto, (max-width: 2264px) 100vw, 2264px" /></p>
<h3>Fastening the slats and screwing</h3>
<p>The remaining slats are attached one by one with the screw in the middle (see figure 4.3.1). Then insert the remaining screws, but do not tighten them yet (see figure 4.3.2). When the solar panel is evenly positioned, first tighten the middle screws of each strip.<br />
Then tighten all the remaining screws and retighten them after a short time. If the solar panel still has some play, you can place some shims between the solar panel and the rail until it is firmly in place. Figure 4.3.3 shows how the hollow bushing and retaining bridge are attached to the inside of the back cover.<br />
Finally, the back cover is screwed onto the frame with four screws (see Fig. 4.3.4).</p>
<h3 data-start="62" data-end="294"><img loading="lazy" decoding="async" class="aligncenter wp-image-1705 zoooom" style="font-family: 'Source Sans Pro', Graphik, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif; font-size: 1.125rem;" src="https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-3.jpg" alt="" width="2276" height="1330" srcset="https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-3.jpg 2279w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-3-300x175.jpg 300w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-3-1024x598.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-3-768x449.jpg 768w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-3-1536x898.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-3-2048x1197.jpg 2048w" sizes="auto, (max-width: 2276px) 100vw, 2276px" /></h3>
<p>Only a few steps are required to complete the bracket:<br />
First, the M6 nut is pressed into the joint bracket (see figure 4.4.1).<br />
The holder for the railing is then attached to the joint holder with an M6 screw (see Figure 4.4.2).<br />
The joint holder is now screwed to the back cover with three M3 screws.<br />
Do not forget: The M3 nuts must be pressed into the counterholder that will later be used for mounting on the railing (see figure 4.4.4).</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1704 zoooom" src="https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-4.jpg" alt="" width="2264" height="1320" srcset="https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-4.jpg 2278w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-4-300x175.jpg 300w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-4-1024x597.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-4-768x448.jpg 768w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-4-1536x895.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-4-2048x1194.jpg 2048w" sizes="auto, (max-width: 2264px) 100vw, 2264px" /></p>
<h2>Exploded view of the solar panel mount</h2>
<p>For a better overview, there is an exploded view of the solar panel holder in Figure 4.5.1.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1703 zoooom" src="https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-5.jpg" alt="" width="2264" height="1320" srcset="https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-5.jpg 2278w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-5-300x175.jpg 300w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-5-1024x597.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-5-768x448.jpg 768w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-5-1536x895.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2025/06/solarpanelhalter4-5-2048x1194.jpg 2048w" sizes="auto, (max-width: 2264px) 100vw, 2264px" /></p>
<h3 data-start="73" data-end="322">Note</h3>
<p data-start="73" data-end="322">Of course, there are also alternative mounting options. For instance, in a garden flower bed, plants may grow over time and gradually shade the solar panel. In this case, a holder with an aluminum rod and ground spike can be used (see Fig. 5.0.1).</p>
<p data-start="324" data-end="477">On a balcony, the panel can be attached via flower boxes that cover the railing; here too, a holder with an aluminum rod is available (see Fig. 5.0.2).</p>
<p data-start="479" data-end="578">Additionally, a holder designed for mounting on a wall or post is also provided (see Fig. 5.0.3).</p>
<p><img decoding="async" src="https://elepla.de/images/Powerbank/2W_Solarpanel_Halterrahmen/5-0.jpg" alt="5 0" /></p>
<p data-start="72" data-end="154">Furthermore, I plan to design a solar panel holder with a built-in USB-C output.</p>
<p data-start="156" data-end="444">The solar panel is an excellent addition for powering my small devices and outdoor sensors – and this holds true even in winter! Depending on your needs, you can either assemble the cables yourself or purchase them ready-made. In any case, the rule of thumb is: the shorter, the better.</p>
<p data-start="446" data-end="559">Have fun building your own version – or perhaps this project has inspired you to create something entirely new.</p>
<h2>Files for Download</h2>
<ul>
<li><a href="https://www.thingiverse.com/thing:6835041">Housing for the solar panel mount</a></li>
</ul>
<p>The post <a href="https://nerd-corner.com/diy-solar-panel-mount-for-2w-panels/">DIY solar panel mount for 2W panels</a> appeared first on <a href="https://nerd-corner.com">Nerd Corner</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://nerd-corner.com/diy-solar-panel-mount-for-2w-panels/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Create Docker images and upload them to Docker Hub</title>
		<link>https://nerd-corner.com/create-docker-images-and-upload-them-to-docker-hub/</link>
					<comments>https://nerd-corner.com/create-docker-images-and-upload-them-to-docker-hub/#respond</comments>
		
		<dc:creator><![CDATA[Nerds]]></dc:creator>
		<pubDate>Thu, 16 Jan 2025 18:16:16 +0000</pubDate>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[angular]]></category>
		<category><![CDATA[Backend]]></category>
		<category><![CDATA[Backend Server]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[Docker Hub]]></category>
		<category><![CDATA[Docker Images]]></category>
		<category><![CDATA[Docker Repository]]></category>
		<category><![CDATA[frontend]]></category>
		<category><![CDATA[google cloud mysql]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[Images]]></category>
		<category><![CDATA[Kubernetes]]></category>
		<category><![CDATA[mySql]]></category>
		<category><![CDATA[Nest]]></category>
		<category><![CDATA[Nest.js]]></category>
		<category><![CDATA[Redis]]></category>
		<category><![CDATA[redis session management]]></category>
		<category><![CDATA[redis session management nest.js]]></category>
		<category><![CDATA[Repository]]></category>
		<category><![CDATA[Step by step guide]]></category>
		<guid isPermaLink="false">https://nerd-corner.com/de/?p=1691</guid>

					<description><![CDATA[<p>In this article, I will show you how to create production-ready Docker images for a web application with Angular, NestJS, MySQL and Redis and then &#8230; </p>
<p>The post <a href="https://nerd-corner.com/create-docker-images-and-upload-them-to-docker-hub/">Create Docker images and upload them to Docker Hub</a> appeared first on <a href="https://nerd-corner.com">Nerd Corner</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In this article, I will show you how to create production-ready Docker images for a web application with Angular, NestJS, MySQL and Redis and then publish them on Docker Hub. The prerequisite is an installed Docker environment.</p>
<p><em><strong>You might also be interested in this: </strong><a href="https://nerd-corner.com/lessons-learned-hosting-nestjs-app-on-vercel/">Hosting NestJS on Vercel</a></em></p>
<h2>Creation of the Docker Compose Yml</h2>
<p>With Docker Compose, all components of an application can be defined via a single configuration file and built or started together.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">version: '3.8'

services:
  frontend:
    build: ./frontend
    ports:
      - "80:80"
    depends_on:
      - backend

  backend:
    build: ./backend
    ports:
      - "3000:3000"
    depends_on:
      - mysql
      - redis
    environment:
      - DATABASE_URL=mysql://user:password@mysql:3306/db
      - SESSION_STORE=redis://redis:6379

  mysql:
    image: mysql:8.0
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_DATABASE: db
    ports:
      - "3306:3306"

  redis:
    image: redis:latest
    ports:
      - "6379:6379"</pre>
<h2>Creating the env file</h2>
<p>To manage environment variables centrally, we create an .env file:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">DATABASE_URL=mysql://user:password@mysql:3306/db 
SESSION_STORE=redis://redis:6379</pre>
<p>Important: All ENV variables used in the code must also appear in docker-compose.yml!</p>
<h2>Docker image for the frontend</h2>
<p>The Angular frontend must be built for production. Here is an example Dockerfile:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">FROM node:20 AS build
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm install
COPY . .
RUN npm run build --prod

FROM nginx:alpine
COPY --from=build /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/nginx.conf</pre>
<p>Since we are dependent on nginx for the build, we also need a corresponding config file:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">server {
  listen 80;
  server_name _;

  location / {
    root /usr/share/nginx/html;
    index index.html;
    try_files $uri $uri/ /index.html;
  }
}</pre>
<h2>Docker image for the backend</h2>
<p>The NestJS backend also needs to be built. Here is an optimized Dockerfile.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic"># Build stage
FROM node:20 AS build
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm install
COPY . .
RUN npm run build

# Production stage
FROM node:20-alpine
WORKDIR /app

COPY --from=build /app/dist ./dist
COPY package.json package-lock.json ./
RUN npm install --only=production
CMD ["node", "dist/main.js"]</pre>
<h2>Building the app with Docker Compose</h2>
<p>Once all the Dockerfiles have been configured, the images can now be built. The whole thing is really easy with Docker compose.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">docker compose up -d --build</pre>
<p>The images are then ready, the containers are built and the app can be tested locally! The last step is to upload the images to DockerHub so that they can be used more easily later for deployment on a server.</p>
<h2>Uploading to Docker Hub</h2>
<p>Uploading is explained step by step below:</p>
<ol>
<li>Create an account on <a href="https://www.docker.com/products/docker-hub/">Dockerhub</a></li>
<li>Create a repository for the frontend and backend (1 private repo is currently free)</li>
<li>Build the images and tag them:
<pre class="EnlighterJSRAW" data-enlighter-language="generic">docker tag &lt;image-id&gt; dockerAccountName/frontend:latest
docker tag &lt;image-id&gt; dockerAccountName/backend:latest</pre>
</li>
<li>Sign up and push the images:
<pre class="EnlighterJSRAW" data-enlighter-language="generic">docker login
docker push dockerAccountName/frontend:latest
docker push dockerAccountName/backend:latest</pre>
</li>
</ol>
<h2>Outlook: Deployment with Kubernetes</h2>
<p>Now that the images are on Docker Hub, nothing stands in the way of deployment. I have opted for a Kubernetes cluster on a Hetzner VPS. <a href="https://nerd-corner.com/deployment-of-a-webapp-with-kubernetes-and-caddy/">More information here</a>.</p>
<p>The post <a href="https://nerd-corner.com/create-docker-images-and-upload-them-to-docker-hub/">Create Docker images and upload them to Docker Hub</a> appeared first on <a href="https://nerd-corner.com">Nerd Corner</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://nerd-corner.com/create-docker-images-and-upload-them-to-docker-hub/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Using a barrel jack as a switch</title>
		<link>https://nerd-corner.com/using-a-barrel-jack-as-a-switch/</link>
					<comments>https://nerd-corner.com/using-a-barrel-jack-as-a-switch/#respond</comments>
		
		<dc:creator><![CDATA[Nerds]]></dc:creator>
		<pubDate>Tue, 18 Jun 2024 17:11:28 +0000</pubDate>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[3D print]]></category>
		<category><![CDATA[barrel jack]]></category>
		<category><![CDATA[CAD design]]></category>
		<category><![CDATA[case]]></category>
		<category><![CDATA[DIY]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[housing]]></category>
		<category><![CDATA[Powerbank]]></category>
		<category><![CDATA[Step by step guide]]></category>
		<category><![CDATA[switch]]></category>
		<category><![CDATA[user guide]]></category>
		<category><![CDATA[Voltmeter]]></category>
		<guid isPermaLink="false">https://nerd-corner.com/de/?p=1577</guid>

					<description><![CDATA[<p>In many everyday devices, such as battery-operated radios, lamps, torches and especially laptops, a barrel jack is used for the power supply. In these cases, &#8230; </p>
<p>The post <a href="https://nerd-corner.com/using-a-barrel-jack-as-a-switch/">Using a barrel jack as a switch</a> appeared first on <a href="https://nerd-corner.com">Nerd Corner</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In many everyday devices, such as battery-operated radios, lamps, torches and especially laptops, a barrel jack is used for the power supply. In these cases, the barrel jack often serves as a switch: as soon as a plug is inserted, the power supply from the battery, rechargeable battery or other source is interrupted and the device is supplied with power directly from the plug, thus saving the battery. The primary circuit is disconnected purely mechanically.</p>
<p><em><strong>This might also be interesting for you: </strong><a href="https://nerd-corner.com/diy-powerbank-with-voltage-regulator-and-voltmeter/">Do it yourself powerbank with voltage regulator and voltmeter</a></em></p>
<h2>List of components</h2>
<p>To demonstrate the function, I have decided on a small test setup. I need the following for my test setup:</p>
<ul>
<li>Barrel jack 5,5 x 2,1 (1.0.1)</li>
<li>Voltmeter (1.0.2)</li>
<li>5V power supply unit (1.0.3)</li>
<li>Barrel jack holder (1.0.4)</li>
<li>Barrel jack Bridge(1.0.5)</li>
<li>Some cables (1.0.6)</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1569 zoooom" src="https://nerd-corner.com/wp-content/uploads/2024/06/1-0.jpg" alt="Hohlbuchse komponenten" width="2280" height="1332" srcset="https://nerd-corner.com/wp-content/uploads/2024/06/1-0.jpg 2291w, https://nerd-corner.com/wp-content/uploads/2024/06/1-0-300x175.jpg 300w, https://nerd-corner.com/wp-content/uploads/2024/06/1-0-1024x598.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2024/06/1-0-768x449.jpg 768w, https://nerd-corner.com/wp-content/uploads/2024/06/1-0-1536x897.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2024/06/1-0-2048x1196.jpg 2048w" sizes="auto, (max-width: 2280px) 100vw, 2280px" /></p>
<h2>Assembly instructions for bracket and bridge</h2>
<p>The first step is to print the holder (1.0.4) and the bridge (1.0.5) with the 3D printer. After cleaning the printed parts, I cut two M2 threads into the holder (see 2.0.1). If you prefer to work with self-tapping screws, you can skip this step. The barrel jack is then pushed into the large hole in the bridge (2.0.2) and screwed tight with the nut on the front of the bridge (2.0.3). Fitting the bridge to the bracket is also very simple: Slide the bridge with the recesses on the right and left over the two cylinder surfaces on the bracket (2.0.4) and secure it with M2 screws (2.0.5). The bracket and bridge with the barrel jack fitted form a very stable unit that can absorb large forces. If everything is fitted correctly, the barrel jack should not protrude, but should be recessed by 0.3 to 0.5 mm.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1574 zoooom" src="https://nerd-corner.com/wp-content/uploads/2024/06/2-0.jpg" alt="jack socket hohlstecker" width="2280" height="1332" srcset="https://nerd-corner.com/wp-content/uploads/2024/06/2-0.jpg 2291w, https://nerd-corner.com/wp-content/uploads/2024/06/2-0-300x175.jpg 300w, https://nerd-corner.com/wp-content/uploads/2024/06/2-0-1024x598.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2024/06/2-0-768x449.jpg 768w, https://nerd-corner.com/wp-content/uploads/2024/06/2-0-1536x897.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2024/06/2-0-2048x1196.jpg 2048w" sizes="auto, (max-width: 2280px) 100vw, 2280px" /></p>
<h2>Wiring and soldering the barrel jack</h2>
<p>Now we come to the core of this article: wiring and soldering the barrel jack. I use pre-assembled plugs and sockets that already contain crimped cables and a strain relief. The colour coding of the cables is also practical, as red stands for plus and black for minus (3.0.1).</p>
<p>The barrel jack with switching function usually has three solder lugs. The negative pole is always switched, i.e. in figure 3.0.2 this corresponds to number two. The negative pole of the primary power supply, e.g. battery or accumulator, is also soldered on here. Solder lug number one is intended for the common positive terminal; all positive connections are soldered here. The negative pole to the consumers in the device is soldered to soldering lug number three. Figure 3.0.3 shows the complete soldering of the barrel jack.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1573" src="https://nerd-corner.com/wp-content/uploads/2024/06/3-0.jpg" alt="jack socket hohlstecker" width="2280" height="1332" srcset="https://nerd-corner.com/wp-content/uploads/2024/06/3-0.jpg 2291w, https://nerd-corner.com/wp-content/uploads/2024/06/3-0-300x175.jpg 300w, https://nerd-corner.com/wp-content/uploads/2024/06/3-0-1024x598.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2024/06/3-0-768x449.jpg 768w, https://nerd-corner.com/wp-content/uploads/2024/06/3-0-1536x897.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2024/06/3-0-2048x1196.jpg 2048w" sizes="auto, (max-width: 2280px) 100vw, 2280px" /></p>
<h2>Assembly and connection</h2>
<p>After successful soldering, you can now continue with the rest of the test setup. Firstly, the holder with the soldered barrel jack is screwed onto a wooden plate (4.0.1). The two mini-voltmeters are then attached to the wooden plate (4.0.2). The mini voltmeters are a creation of Nerd Corner. <a href="https://nerd-corner.com/diy-powerbank-with-voltage-regulator-and-voltmeter/">If you are interested in such housings, you can read the corresponding article and download the STL files at the following link.</a></p>
<p>Now I connect the cables soldered to the barrel jack to the mini-voltmeters (see Figure 4.0.2, pink frame). Next, I connect the primary power source to my 5V power supply and switch it on (see Figure 4.0.3, yellow frame). After switching on the power supply, a voltage is present at both mini voltmeters: 5.35 volts at the supply (red circle) and 5.28 volts at the load (green circle).</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1572 zoooom" src="https://nerd-corner.com/wp-content/uploads/2024/06/4-0.jpg" alt="jack socket hohlstecker" width="2280" height="1332" srcset="https://nerd-corner.com/wp-content/uploads/2024/06/4-0.jpg 2291w, https://nerd-corner.com/wp-content/uploads/2024/06/4-0-300x175.jpg 300w, https://nerd-corner.com/wp-content/uploads/2024/06/4-0-1024x598.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2024/06/4-0-768x449.jpg 768w, https://nerd-corner.com/wp-content/uploads/2024/06/4-0-1536x897.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2024/06/4-0-2048x1196.jpg 2048w" sizes="auto, (max-width: 2280px) 100vw, 2280px" /></p>
<h2>Integration of the second power source</h2>
<p>As the current flows cleanly via the barrel jack to the consumer, the second power source now comes into play. I operate this with 12 V in order to have a clear difference to the primary power supply. Figure 4.1.1 shows the second power supply with 12.2 volts (turquoise frame).</p>
<p>Now I plug the second power supply with 12 volts into the barrel jack (Figure 4.1.2, blue frame). After a short delay, the value on the consumer&#8217;s mini-voltmeter changes to 12 volts (green frame). Nothing has changed on the primary power supply; it remains plugged in and switched on (red frame). The value is still 5.34 volts, which is 0.01 volts lower than before the second power supply was plugged in, but this is due to the fluctuations of the 5V power supply.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1571 zoooom" src="https://nerd-corner.com/wp-content/uploads/2024/06/4-1.jpg" alt="jack socket hohlstecker" width="2280" height="1332" srcset="https://nerd-corner.com/wp-content/uploads/2024/06/4-1.jpg 2291w, https://nerd-corner.com/wp-content/uploads/2024/06/4-1-300x175.jpg 300w, https://nerd-corner.com/wp-content/uploads/2024/06/4-1-1024x598.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2024/06/4-1-768x449.jpg 768w, https://nerd-corner.com/wp-content/uploads/2024/06/4-1-1536x897.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2024/06/4-1-2048x1196.jpg 2048w" sizes="auto, (max-width: 2280px) 100vw, 2280px" /></p>
<p>As a final step, I remove the 5 volt power supply unit from the primary circuit to check whether there really is no voltage on the primary circuit. Figure 4.2.1 in the yellow frame remains dark and so the test was successful!</p>
<p><img loading="lazy" decoding="async" class="zoooom aligncenter wp-image-1570" src="https://nerd-corner.com/wp-content/uploads/2024/06/4-2.jpg" alt="barrel jack switch hohlstecker" width="2280" height="1332" srcset="https://nerd-corner.com/wp-content/uploads/2024/06/4-2.jpg 2291w, https://nerd-corner.com/wp-content/uploads/2024/06/4-2-300x175.jpg 300w, https://nerd-corner.com/wp-content/uploads/2024/06/4-2-1024x598.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2024/06/4-2-768x449.jpg 768w, https://nerd-corner.com/wp-content/uploads/2024/06/4-2-1536x897.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2024/06/4-2-2048x1196.jpg 2048w" sizes="auto, (max-width: 2280px) 100vw, 2280px" /></p>
<p>&nbsp;</p>
<h2>Files for Downloading</h2>
<ul>
<li><a href="https://www.thingiverse.com/thing:6313994">Barrel jack holder and bridge</a></li>
</ul>
<p>The post <a href="https://nerd-corner.com/using-a-barrel-jack-as-a-switch/">Using a barrel jack as a switch</a> appeared first on <a href="https://nerd-corner.com">Nerd Corner</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://nerd-corner.com/using-a-barrel-jack-as-a-switch/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Enable TensorFlow GPU under Windows</title>
		<link>https://nerd-corner.com/enable-tensorflow-gpu-under-windows/</link>
					<comments>https://nerd-corner.com/enable-tensorflow-gpu-under-windows/#comments</comments>
		
		<dc:creator><![CDATA[Nerds]]></dc:creator>
		<pubDate>Tue, 09 May 2023 21:40:43 +0000</pubDate>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Deep Learning]]></category>
		<category><![CDATA[GPU]]></category>
		<category><![CDATA[graphics card]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[Machine Learning]]></category>
		<category><![CDATA[ML]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Step by step guide]]></category>
		<category><![CDATA[Tensorflow]]></category>
		<category><![CDATA[TensorFlow GPU]]></category>
		<category><![CDATA[Tensorflow guide]]></category>
		<category><![CDATA[user guide]]></category>
		<category><![CDATA[Windows]]></category>
		<guid isPermaLink="false">https://nerd-corner.com/de/?p=1376</guid>

					<description><![CDATA[<p>I am currently working on a hobby project where I want to translate German sentences into Bavarian using AI, for example on the website Dialektl.com. &#8230; </p>
<p>The post <a href="https://nerd-corner.com/enable-tensorflow-gpu-under-windows/">Enable TensorFlow GPU under Windows</a> appeared first on <a href="https://nerd-corner.com">Nerd Corner</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I am currently working on a hobby project where I want to translate German sentences into Bavarian using AI, for example on the website <a href="http://dialektl.com" target="_blank" rel="noopener">Dialektl.com</a>. I am working with Tensorflow, an open source platform for machine learning and deep learning. Tensorflow is one of the most widely used libraries for Deep Learning because it offers a wide range of features and a very active developer community. For almost all machine learning models, the training process is extremely computationally expensive. To increase the speed of the training process, it is recommended to use the computer&#8217;s graphics card (GPU) instead of the processor (CPU).</p>
<p>My naive thought was that Tensorflow would automatically use the GPU. However, you first have to follow the step-by-step instructions below in order for Tensorflow to recognise and use the GPU at all.</p>
<p><em><strong>You might also be interested in:</strong> <a href="https://nerd-corner.com/tensorflow-js-vs-tensorflow-python/">Should I use Tensorflow.js or Tensorflow (Python)?</a></em></p>
<p><strong>DISCLAIMER: As of version 2.11, Tensorflow no longer supports GPUs under Windows! Either change the operating system or downgrade Tensorflow to version 2.10. In addition, a graphics card from NVIDIA is required!</strong></p>
<h3>1. Checking the desired CUDA and cuDNN versions</h3>
<p>First, you should find out which CUDA and cuDNN version you need for TensorFlow. The website lists all versions of Tensorflow and the desired CUDA versions or cuDNN versions:<a href="https://www.tensorflow.org/install/source_windows#gpu"> https://www.tensorflow.org/install/source_windows#gpu</a></p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1372 zoooom" src="https://nerd-corner.com/wp-content/uploads/2023/05/tensorflow_requirements.png" alt="tensorflow requirements" width="1120" height="562" srcset="https://nerd-corner.com/wp-content/uploads/2023/05/tensorflow_requirements.png 1128w, https://nerd-corner.com/wp-content/uploads/2023/05/tensorflow_requirements-300x151.png 300w, https://nerd-corner.com/wp-content/uploads/2023/05/tensorflow_requirements-1024x514.png 1024w, https://nerd-corner.com/wp-content/uploads/2023/05/tensorflow_requirements-768x385.png 768w" sizes="auto, (max-width: 1120px) 100vw, 1120px" /></p>
<h2>2. Checking your own graphics card</h2>
<p>As already mentioned in the disclaimer, the graphics card must be from NVIDIA. On the website <a href="https://developer.nvidia.com/cuda-gpus" target="_blank" rel="noopener">https://developer.nvidia.com/cuda-gpus</a> you can search for your own GPU and check the &#8220;Compute Capability&#8221;. The minimum requirement for Tensorflow is a value of 3.5, but this is fulfilled by all current graphics cards.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1371 zoooom" src="https://nerd-corner.com/wp-content/uploads/2023/05/cuda-architectures.png" alt="cuda architectures" width="1120" height="158" srcset="https://nerd-corner.com/wp-content/uploads/2023/05/cuda-architectures.png 1129w, https://nerd-corner.com/wp-content/uploads/2023/05/cuda-architectures-300x42.png 300w, https://nerd-corner.com/wp-content/uploads/2023/05/cuda-architectures-1024x144.png 1024w, https://nerd-corner.com/wp-content/uploads/2023/05/cuda-architectures-768x108.png 768w" sizes="auto, (max-width: 1120px) 100vw, 1120px" /></p>
<h2>3. Installing the latest NVIDIA drivers</h2>
<p>To enable the GPU for TensorFlow, the latest NVIDIA drivers must be installed. Simply go to the NVIDIA website and download the latest driver for your graphics card.</p>
<h2>4. Install Visual Studio (optional)</h2>
<p>In TensorFlow, some parts of the library have been written in C++ to maximise performance. Therefore, installing Visual Studio can help improve the compatibility and performance of TensorFlow:<a style="font-size: 1.125rem; color: midnightblue; outline: 0px;" href="https://visualstudio.microsoft.com/de/vs/"> https://visualstudio.microsoft.com/de/vs/</a></p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1370 zoooom" src="https://nerd-corner.com/wp-content/uploads/2023/05/vs-studio-download.png" alt="Visual studio installer" width="690" height="304" srcset="https://nerd-corner.com/wp-content/uploads/2023/05/vs-studio-download.png 694w, https://nerd-corner.com/wp-content/uploads/2023/05/vs-studio-download-300x132.png 300w" sizes="auto, (max-width: 690px) 100vw, 690px" /></p>
<p>It is sufficient to select individual components here. I have selected everything with C++ in &#8220;Compiler, Buildtools and Runtimes&#8221; and also MS Build, which in turn automatically installs a few more components. All in all, however, over 25 GB!</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1369 zoooom" src="https://nerd-corner.com/wp-content/uploads/2023/05/VS-studio-components.png" alt="choose components in visual studio" width="880" height="751" srcset="https://nerd-corner.com/wp-content/uploads/2023/05/VS-studio-components.png 885w, https://nerd-corner.com/wp-content/uploads/2023/05/VS-studio-components-300x256.png 300w, https://nerd-corner.com/wp-content/uploads/2023/05/VS-studio-components-768x655.png 768w" sizes="auto, (max-width: 880px) 100vw, 880px" /></p>
<h2>5. Install CUDA Toolkit</h2>
<p>The CUDA Toolkit is a toolkit for CUDA application development provided by NVIDIA. TensorFlow requires CUDA to run on the GPU. Simply download and install the version of the CUDA toolkit requested in step 1 from the NVIDIA website: <a href="https://developer.nvidia.com/cuda-downloads">https://developer.nvidia.com/cuda-downloads</a></p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1368 zoooom" src="https://nerd-corner.com/wp-content/uploads/2023/05/Cuda-toolkit-download.png" alt="download cuda toolkit" width="1130" height="889" srcset="https://nerd-corner.com/wp-content/uploads/2023/05/Cuda-toolkit-download.png 1135w, https://nerd-corner.com/wp-content/uploads/2023/05/Cuda-toolkit-download-300x236.png 300w, https://nerd-corner.com/wp-content/uploads/2023/05/Cuda-toolkit-download-1024x806.png 1024w, https://nerd-corner.com/wp-content/uploads/2023/05/Cuda-toolkit-download-768x604.png 768w" sizes="auto, (max-width: 1130px) 100vw, 1130px" /></p>
<h2>6. Installing the cuDNN libraries</h2>
<p>cuDNN is a library of deep learning primitives provided by NVIDIA. TensorFlow also requires cuDNN to run on the GPU. cuDNN is free, but you have to create an account as NVIDIA Developer: <a href="https://developer.nvidia.com/rdp/cudnn-download">https://developer.nvidia.com/rdp/cudnn-download</a></p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1367 zoooom" src="https://nerd-corner.com/wp-content/uploads/2023/05/cuDNN-download.png" alt="cuDNN download" width="1710" height="875" srcset="https://nerd-corner.com/wp-content/uploads/2023/05/cuDNN-download.png 1717w, https://nerd-corner.com/wp-content/uploads/2023/05/cuDNN-download-300x154.png 300w, https://nerd-corner.com/wp-content/uploads/2023/05/cuDNN-download-1024x524.png 1024w, https://nerd-corner.com/wp-content/uploads/2023/05/cuDNN-download-768x393.png 768w, https://nerd-corner.com/wp-content/uploads/2023/05/cuDNN-download-1536x786.png 1536w" sizes="auto, (max-width: 1710px) 100vw, 1710px" /></p>
<p>After the download, the content must be unpacked. The content is moved to the &#8220;NVIDIA GPU Computing Toolkit&#8221; in the &#8220;Programs&#8221; folder. After moving, copy the file path of the &#8220;bin&#8221; folder.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1366 zoooom" src="https://nerd-corner.com/wp-content/uploads/2023/05/unzip-cuDNN.png" alt="unzip cuDNN" width="670" height="226" srcset="https://nerd-corner.com/wp-content/uploads/2023/05/unzip-cuDNN.png 673w, https://nerd-corner.com/wp-content/uploads/2023/05/unzip-cuDNN-300x101.png 300w" sizes="auto, (max-width: 670px) 100vw, 670px" /></p>
<h2>7. Set PATH variable</h2>
<p>Open the environment variables by simply typing the term into the Windows search. Then edit the system variable &#8220;path&#8221; and add a new entry with the file path of the &#8220;bin&#8221; folder from the previous step.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1365 zoooom" src="https://nerd-corner.com/wp-content/uploads/2023/05/path-variable.png" alt="Set path variable for tensorflow gpu" width="1220" height="203" srcset="https://nerd-corner.com/wp-content/uploads/2023/05/path-variable.png 1223w, https://nerd-corner.com/wp-content/uploads/2023/05/path-variable-300x50.png 300w, https://nerd-corner.com/wp-content/uploads/2023/05/path-variable-1024x170.png 1024w, https://nerd-corner.com/wp-content/uploads/2023/05/path-variable-768x127.png 768w" sizes="auto, (max-width: 1220px) 100vw, 1220px" /></p>
<h2>8. Creating a virtual environment</h2>
<p>It is recommended to install TensorFlow in a virtual environment to avoid conflicts with other Python packages. Ideally using Anaconda. Simply download and install here: <a href="https://www.anaconda.com/download">https://www.anaconda.com/download</a></p>
<p>Then start the Anaconda Navigator. Create a new environment under Environments &gt; Create. Then click on Home again and launch an existing Python IDE from here. Additional IDEs such as PyCharm should also be automatically displayed here after the download.</p>
<h2>9. Verify Tensorflow GPU support</h2>
<p>To check whether the TensorFlow GPU support was successfully detected, the Tensorflow package should first be installed in the Python IDE. But note that under Windows the GPU is only recognised up to version 2.10! In the following versions it is no longer recognised! Tensorflow 2.10 must therefore be installed.</p>
<p>Then run the following code to display a list of available GPUs:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="python">import tensorflow as tf

tf.config.list_physical_devices('GPU')</pre>
<p>&nbsp;</p>
<p>The post <a href="https://nerd-corner.com/enable-tensorflow-gpu-under-windows/">Enable TensorFlow GPU under Windows</a> appeared first on <a href="https://nerd-corner.com">Nerd Corner</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://nerd-corner.com/enable-tensorflow-gpu-under-windows/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
