<?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 Galaxypatchara on Medium]]></title>
        <description><![CDATA[Stories by Galaxypatchara on Medium]]></description>
        <link>https://medium.com/@galaxypatchara?source=rss-76999f0b3205------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*WrY2WDQ_12ZJfOxk</url>
            <title>Stories by Galaxypatchara on Medium</title>
            <link>https://medium.com/@galaxypatchara?source=rss-76999f0b3205------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 14:51:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@galaxypatchara/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[✅ สรุปขั้นตอนการใช้ HPC LANTA กับ Jupyter Notebook (MacOS)]]></title>
            <link>https://medium.com/@galaxypatchara/%E0%B8%AA%E0%B8%A3%E0%B8%B8%E0%B8%9B%E0%B8%82%E0%B8%B1%E0%B9%89%E0%B8%99%E0%B8%95%E0%B8%AD%E0%B8%99%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%83%E0%B8%8A%E0%B9%89-hpc-lanta-%E0%B8%81%E0%B8%B1%E0%B8%9A-jupyter-notebook-macos-1ed6bbdec4dc?source=rss-76999f0b3205------2</link>
            <guid isPermaLink="false">https://medium.com/p/1ed6bbdec4dc</guid>
            <dc:creator><![CDATA[Galaxypatchara]]></dc:creator>
            <pubDate>Thu, 10 Apr 2025 04:41:55 GMT</pubDate>
            <atom:updated>2025-04-10T04:41:55.053Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>สรุปคำสั่งและขั้นตอนทั้งหมดแบบรวบรัด ในการใช้งาน LANTA HPC กับ Jupyter Notebook บนเครื่อง MacOS</strong> อย่างเป็นระบบ ใช้ได้ทั้งสำหรับงานวิจัยและการเรียนรู้</p><h3>✅ สรุปขั้นตอนการใช้ HPC LANTA กับ Jupyter Notebook (MacOS)</h3><h3>🔹 1. เปิด Terminal และ SSH เข้า HPC LANTA</h3><pre><br>ssh -Y  your_username@lanta.nstda.or.th</pre><blockquote><em>เปลี่ยน </em><em>your_username เป็นชื่อผู้ใช้ของคุณบน LANTA</em></blockquote><h3>🔹 2. โหลด Mamba (จัดการ Python Env)</h3><pre>module load mamba<br>0r<br>ml mamba</pre><h3>🔹 3. สร้าง Virtual Environment ด้วย Mamba</h3><pre>mamba create -n my_env python=3.9 -y<br>mamba activate my_env</pre><blockquote><em>คุณสามารถตั้งชื่อ environment ได้ตามต้องการ เช่น </em><em>my_env</em></blockquote><h3>🔹 4. ติดตั้ง Jupyter Notebook ลงใน Environment</h3><pre>mamba install jupyter -y</pre><p>หรือถ้าอยากใช้ <strong>Jupyter Lab (UI สวยกว่า)</strong>:</p><pre>mamba install jupyterlab -y</pre><h3>🔹 5. รัน Jupyter Notebook แบบไม่เปิด Browser (บน HPC)</h3><pre>jupyter notebook --no-browser --port=8888</pre><p>หรือถ้าใช้ <strong>Jupyter Lab</strong>:</p><pre>jupyter lab --no-browser --port=8888</pre><blockquote><em>จะมีลิงก์พร้อม token โชว์ใน Terminal เช่น<br> </em><a href="http://127.0.0.1:8888/?token=xxxx"><em>http://127.0.0.1:8888/?token=xxxx</em></a></blockquote><h3>🔹 6. เปิด Tunnel จาก MacOS (เพื่อเข้า Jupyter ผ่าน Browser)</h3><p><strong>บนเครื่อง Mac ของคุณ (เปิด Terminal ใหม่):</strong></p><pre>ssh -L 8888:localhost:8888 your_username@lanta.nstda.or.th</pre><blockquote><em>อย่าปิด session นี้จนกว่าจะเลิกใช้งาน Jupyter</em></blockquote><h3>🔹 7. เปิด Browser บน Mac ไปที่:</h3><pre>http://localhost:8888</pre><blockquote><em>จากนั้นใส่ token ที่ได้จากขั้นตอนที่ 5 เพื่อเข้าใช้งาน</em></blockquote><h3>🔹 8. (ถ้าต้องการ) ติดตั้ง PyTorch + CUDA ใน HPC สำหรับใช้ GPU</h3><pre>mamba install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia -y</pre><p>เช็คว่า GPU ใช้ได้ไหม:</p><pre>import torch<br>print(torch.cuda.is_available())  # ถ้า True แปลว่าใช้ GPU ได้</pre><h3>🔹 9. ปิดการทำงานเมื่อใช้งานเสร็จ</h3><p>ในหน้า Terminal ที่รัน Jupyter:</p><pre>Ctrl + C</pre><p>จากนั้น:</p><pre>mamba deactivate<br>exit</pre><h3>🧠 คำแนะนำเพิ่มเติม</h3><ul><li>ใช้ screen หรือ tmux เพื่อให้ Notebook ไม่ดับแม้ SSH หลุด</li><li>อย่าลืมโหลดโมดูลอื่น ๆ ที่จำเป็น เช่น cuda, gcc ถ้ารันโมเดล deep learning</li><li>ใช้ Python version ที่เหมาะกับแพ็กเกจที่จะติดตั้ง เช่น python=3.9 มักจะเสถียร</li></ul><h3>📌 ตัวอย่างสรุปคำสั่งทั้งหมดในแบบลัด</h3><pre>ssh your_username@lanta.nstda.or.th<br>module load mamba<br>mamba create -n my_env python=3.9 -y<br>mamba activate my_env<br>mamba install jupyterlab -y<br>jupyter lab --no-browser --port=8888</pre><p>บน Mac:</p><pre>ssh -L 8888:localhost:8888 your_username@lanta.nstda.or.th</pre><p>เปิด browser ไปที่: <a href="http://localhost:8888/">http://localhost:8888</a></p><p>ขอบคุณที่เข้ามาอ่านครับ 😄</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1ed6bbdec4dc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[คำสั่ง Command Line สำหรับ Windows และ Linux]]></title>
            <link>https://medium.com/@galaxypatchara/%E0%B8%84%E0%B8%B3%E0%B8%AA%E0%B8%B1%E0%B9%88%E0%B8%87-command-line-%E0%B8%AA%E0%B8%B3%E0%B8%AB%E0%B8%A3%E0%B8%B1%E0%B8%9A-windows-%E0%B9%81%E0%B8%A5%E0%B8%B0-linux-e983780013da?source=rss-76999f0b3205------2</link>
            <guid isPermaLink="false">https://medium.com/p/e983780013da</guid>
            <dc:creator><![CDATA[Galaxypatchara]]></dc:creator>
            <pubDate>Thu, 10 Apr 2025 03:06:39 GMT</pubDate>
            <atom:updated>2025-04-10T03:06:39.414Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>คำสั่งพื้นฐานสำหรับทั้ง Windows และ Linux</blockquote><p>By : Sakol Patchapanyawat</p><h3>🧠การนำทางในระบบไฟล์</h3><p><strong>Linux/Mac (bash)</strong></p><pre>pwd       # แสดงตำแหน่งปัจจุบัน<br>ls        # แสดงรายการไฟล์และโฟลเดอร์<br>ls -l     # แสดงรายละเอียดไฟล์<br>cd &lt;dir&gt;  # เปลี่ยนไดเรกทอรี<br>cd ~      # กลับไปที่ home directory<br>cd ..     # ขึ้นไปหนึ่งระดับ</pre><p><strong>Windows (CMD)</strong></p><pre>cd        # แสดงตำแหน่งปัจจุบัน<br>dir       # แสดงรายการไฟล์และโฟลเดอร์<br>cd &lt;dir&gt;  # เปลี่ยนไดเรกทอรี<br>cd \      # กลับไปที่ root directory<br>cd ..     # ขึ้นไปหนึ่งระดับ</pre><h3>🧠การจัดการไฟล์และโฟลเดอร์</h3><p><strong>Linux/Mac</strong></p><pre>mkdir &lt;dir&gt;      # สร้างโฟลเดอร์<br>touch &lt;file&gt;     # สร้างไฟล์เปล่า<br>cp &lt;src&gt; &lt;dest&gt;  # คัดลอกไฟล์<br>mv &lt;src&gt; &lt;dest&gt;  # ย้ายหรือเปลี่ยนชื่อไฟล์<br>rm &lt;file&gt;        # ลบไฟล์<br>rm -r &lt;dir&gt;      # ลบโฟลเดอร์และเนื้อหาภายใน</pre><p><strong>Windows</strong></p><pre>mkdir &lt;dir&gt;      # สร้างโฟลเดอร์<br>type nul &gt; &lt;file&gt; # สร้างไฟล์เปล่า<br>copy &lt;src&gt; &lt;dest&gt; # คัดลอกไฟล์<br>move &lt;src&gt; &lt;dest&gt; # ย้ายหรือเปลี่ยนชื่อไฟล์<br>del &lt;file&gt;       # ลบไฟล์<br>rmdir /s &lt;dir&gt;   # ลบโฟลเดอร์และเนื้อหาภายใน</pre><h3>🧠การดูและแก้ไขไฟล์</h3><p><strong>Linux/Mac</strong></p><pre>cat &lt;file&gt;       # แสดงเนื้อหาไฟล์<br>less &lt;file&gt;      # แสดงเนื้อหาแบบหน้าเดียวต่อครั้ง<br>head &lt;file&gt;      # แสดงส่วนหัวของไฟล์<br>tail &lt;file&gt;      # แสดงส่วนท้ายของไฟล์<br>nano &lt;file&gt;      # แก้ไขไฟล์ด้วย nano editor<br>vim &lt;file&gt;       # แก้ไขไฟล์ด้วย vim editor</pre><p><strong>Windows</strong></p><pre>type &lt;file&gt;      # แสดงเนื้อหาไฟล์<br>more &lt;file&gt;      # แสดงเนื้อหาแบบหน้าเดียวต่อครั้ง<br>notepad &lt;file&gt;   # แก้ไขไฟล์ด้วย Notepad</pre><h3>🧠Section พิเศษ: คำสั่ง Git</h3><h4>การตั้งค่าเบื้องต้น</h4><pre>git config --global user.name &quot;Your Name&quot;<br>git config --global user.email &quot;your.email@example.com&quot;</pre><h3>🧠การทำงานกับ repository</h3><pre>git init                  # เริ่มต้น repository ใหม่<br>git clone &lt;url&gt;           # โคลน repository จากระยะไกล<br>git status                # ตรวจสอบสถานะของ repository<br>git add &lt;file&gt;            # เพิ่มไฟล์ไปยัง staging area<br>git add .                 # เพิ่มทุกไฟล์ที่เปลี่ยนแปลง<br>git commit -m &quot;message&quot;   # commit การเปลี่ยนแปลง<br>git push                  # อัพโหลดการเปลี่ยนแปลงไปยัง remote<br>git pull                  # ดึงการเปลี่ยนแปลงจาก remote</pre><h3>การทำงานกับ branch</h3><pre>git branch                # แสดง branch ทั้งหมด<br>git branch &lt;name&gt;         # สร้าง branch ใหม่<br>git checkout &lt;branch&gt;     # เปลี่ยน branch<br>git merge &lt;branch&gt;        # รวม branch ปัจจุบันกับ branch ที่ระบุ</pre><h3>Section พิเศษ: คำสั่ง Conda</h3><h4>การจัดการ environment</h4><pre>conda create --name myenv          # สร้าง environment ใหม่<br>conda activate myenv               # เปิดใช้งาน environment<br>conda deactivate                   # ออกจาก environment ปัจจุบัน<br>conda env list                     # แสดงรายการ environment ทั้งหมด<br>conda remove --name myenv --all    # ลบ environment</pre><h3>🧠การจัดการ packages</h3><pre>conda install numpy        # ติดตั้ง package<br>conda list                 # แสดงรายการ packages ที่ติดตั้งแล้ว<br>conda update numpy         # อัปเดต package<br>conda remove numpy         # ลบ package<br>conda search &quot;numpy&quot;       # ค้นหา package</pre><h3>🧠Section พิเศษ: คำสั่ง Docker</h3><h4>การจัดการ containers</h4><pre>docker run -it ubuntu /bin/bash   # รัน container จาก image<br>docker ps                        # แสดง containers ที่กำลังทำงาน<br>docker ps -a                     # แสดง containers ทั้งหมด<br>docker stop &lt;container_id&gt;       # หยุด container<br>docker rm &lt;container_id&gt;         # ลบ container</pre><h3>🧠การจัดการ images</h3><pre>docker pull ubuntu          # ดึง image จาก Docker Hub<br>docker images               # แสดง images ทั้งหมด<br>docker rmi &lt;image_id&gt;       # ลบ image<br>docker build -t myimage .   # สร้าง image จาก Dockerfile</pre><h3>🧠การจัดการ networks และ volumes</h3><pre>docker network ls           # แสดง networks ทั้งหมด<br>docker volume ls            # แสดง volumes ทั้งหมด</pre><h3>เทคนิค Shell Script</h3><h4>ตัวอย่าง Shell Script พื้นฐาน</h4><pre>#!/bin/bash<br><br># ตัวแปร<br>name=&quot;John&quot;<br>echo &quot;Hello, $name!&quot;<br><br># เงื่อนไข<br>if [ &quot;$name&quot; == &quot;John&quot; ]; then<br>    echo &quot;Name is John&quot;<br>else<br>    echo &quot;Name is not John&quot;<br>fi<br><br># ลูป<br>for i in {1..5}; do<br>    echo &quot;Number: $i&quot;<br>done<br><br># ฟังก์ชัน<br>greet() {<br>    echo &quot;Hello, $1!&quot;<br>}<br><br>greet &quot;Alice&quot;</pre><h4>🧠 การใช้งาน pipe และ redirection</h4><pre># pipe<br>cat file.txt | grep &quot;pattern&quot; | sort<br><br># redirection<br>ls &gt; output.txt          # เขียนผลลัพธ์ไปยังไฟล์<br>ls &gt;&gt; output.txt         # เพิ่มผลลัพธ์ไปยังไฟล์<br>grep &quot;pattern&quot; &lt; input.txt # อ่าน input จากไฟล์</pre><h4>🧠การตรวจสอบเงื่อนไขใน bash</h4><pre># ตรวจสอบการมีอยู่ของไฟล์<br>if [ -f &quot;file.txt&quot; ]; then<br>    echo &quot;File exists&quot;<br>fi<br><br># ตรวจสอบการมีอยู่ของไดเรกทอรี<br>if [ -d &quot;directory&quot; ]; then<br>    echo &quot;Directory exists&quot;<br>fi<br><br># ตรวจสอบ permission<br>if [ -x &quot;script.sh&quot; ]; then<br>    echo &quot;Script is executable&quot;<br>fi</pre><p>🔹 สรุปพื้นฐาน Command Line (Windows vs Linux)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nq_QvuwGW2HsRLKozp-JWA.png" /></figure><p>Command Line Basics:</p><ol><li>References Linux Command Line Basics:</li></ol><ul><li><a href="https://www.google.com/url?q=https%3A%2F%2Fubuntu.com%2Ftutorials%2Fcommand-line-for-beginners">https://ubuntu.com/tutorials/command-line-for-beginners</a></li></ul><p>2. Windows Command Line Reference:</p><ul><li><a href="https://www.google.com/url?q=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows-server%2Fadministration%2Fwindows-commands%2Fwindows-commands">https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/windows-commands</a></li></ul><p>3. Git Documentation:</p><ul><li><a href="https://www.google.com/url?q=https%3A%2F%2Fgit-scm.com%2Fdocs">https://git-scm.com/docs</a></li></ul><p>4. Conda Documentation:</p><ul><li><a href="https://www.google.com/url?q=https%3A%2F%2Fdocs.conda.io%2Fen%2Flatest%2F">https://docs.conda.io/en/latest/</a></li></ul><p>5. Docker Documentation:</p><ul><li><a href="https://www.google.com/url?q=https%3A%2F%2Fdocs.docker.com%2Fengine%2Freference%2Fcommandline%2Fcli%2F">https://docs.docker.com/engine/reference/commandline/cli/</a></li></ul><p>6. Bash Scripting Guide:</p><ul><li><a href="https://www.google.com/url?q=https%3A%2F%2Fwww.gnu.org%2Fsoftware%2Fbash%2Fmanual%2Fbash.html">https://www.gnu.org/software/bash/manual/bash.html</a></li><li><a href="https://www.google.com/url?q=https%3A%2F%2Ftldp.org%2FLDP%2Fabs%2Fhtml%2F">https://tldp.org/LDP/abs/html/</a></li></ul><p>7. Advanced Bash-Scripting Guide:</p><ul><li><a href="https://www.google.com/url?q=https%3A%2F%2Ftldp.org%2FLDP%2Fabs%2Fhtml%2F">https://tldp.org/LDP/abs/html/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e983780013da" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>