Nanocl을 사용해 로컬 LLM을 5분 이내에 실행하기

발행: (2025년 12월 20일 오전 02:23 GMT+9)
4 min read
원문: Dev.to

Source: Dev.to

Cover image for Run local LLMs in under 5 minutes using Nanocl

Nanocl, Ollama 및 Open WebUI를 사용하여 AI‑기반 ChatGPT 웹사이트를 손쉽게 배포하고 관리하세요.

개요

이 가이드는 가벼운 컨테이너 오케스트레이션 플랫폼인 **Nanocl**을 사용하여 AI 모델을 직접 호스팅하는 방법을 보여줍니다. Nanocl을 Ollama(로컬에서 대형 언어 모델을 실행하기 위해)와 Open WebUI(사용자 친화적인 웹 인터페이스 제공)와 결합하면, 개인용 ChatGPT와 유사한 서비스를 빠르게 구축할 수 있습니다.

📺 YouTube 동영상 튜토리얼 보기

YouTube

스택 구성 요소

  • Nanocl – 간단하고 효율적인 컨테이너 오케스트레이션으로 손쉬운 배포와 확장을 지원합니다.
  • Ollama – 강력한 API를 통해 로컬에서 대규모 언어 모델을 실행합니다.
  • Open WebUI – AI 모델과 상호작용할 수 있는 최신 웹 인터페이스.

사전 요구 사항

시작하기 전에 다음이 설치되어 있는지 확인하십시오:

  1. Docker – Linux 배포판에 맞는 공식 가이드를 따라 Docker를 설치합니다.

  2. Nanocl – Nanocl CLI를 설치합니다:

    curl -fsSL https://download.next-hat.com/scripts/get-nanocl.sh | sh

    Nanocl의 그룹 및 내부 서비스를 설정합니다:

    sudo groupadd nanocl
    sudo usermod -aG nanocl $USER
    newgrp nanocl
    nanocl install

    자세한 내용은 Nanocl 문서를 참조하십시오.

  3. (선택 사항) Nvidia Container Toolkit – GPU 가속을 원한다면 Nvidia 컨테이너 툴킷 설치 가이드를 따라 설치하십시오.

Step 1 – Nanocl로 Ollama 배포

다음과 같이 ollama.Statefile.yml 파일을 생성합니다:

ApiVersion: v0.17

Cargoes:
  - Name: ollama
    Container:
      Image: docker.io/ollama/ollama:latest
      Hostname: ollama.local
      HostConfig:
        Binds:
          - ollama:/root/.ollama   # Persist Ollama data
        Runtime: nvidia            # Enable GPU support (optional)
        DeviceRequests:
          - Driver: nvidia
            Count: -1
            Capabilities: [[gpu]]

Ollama를 배포합니다:

nanocl apply -s ollama.Statefile.yml

2단계 – Nanocl로 Open WebUI 배포

openwebui.Statefile.yml라는 파일을 생성합니다:

ApiVersion: v0.17

Cargoes:
  - Name: open-webui
    Container:
      Image: ghcr.io/open-webui/open-webui:main
      Hostname: open-webui.local
      Env:
        - OLLAMA_BASE_URL=http://ollama.local:11434   # Connect to Ollama
      HostConfig:
        Binds:
          - open-webui:/app/backend/data   # Persist WebUI data

Resources:
  - Name: open-webui.local
    Kind: ncproxy.io/rule
    Data:
      Rules:
        - Domain: open-webui.local
          Network: All
          Locations:
            - Path: /
              Version: 1.1
              Headers:
                - Upgrade $http_upgrade
                - Connection "Upgrade"
              Target:
                Key: open-webui.global.c
                Port: 8080

Open WebUI를 배포합니다:

nanocl apply -s openwebui.Statefile.yml

Open WebUI가 필요한 구성 요소를 다운로드하면서 시작하는 데 약간의 시간이 걸립니다. 진행 상황은 다음 명령으로 모니터링할 수 있습니다:

nanocl cargo logs open-webui -f

Step 3 – Access Open WebUI

Add the following line to your /etc/hosts file to map the domain:

127.0.0.1 open-webui.local

Now open your browser and go to . You should see the Open WebUI welcome screen.

1️⃣ Create Your Admin Account

Click Get Started, fill in your details, and click Create Admin Account.

Get Started

Create Admin Account

2️⃣ Download a Model

After logging in, click your avatar (top‑right) → Admin PanelSettingsModels. Click the download icon in the top‑right corner, select a model (e.g., gemma2:2b), and click Download.

[![Download Gemma 2](https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvgo6hvb0nqi4z4orj4uy.png)](https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvgo6hvb0nqi4z4orj4uy.png)

Wait for the download to complete. The model will appear in your list of available models.

3️⃣ Start Chatting

Once the model is ready, create a new chat and say “Hi” to your AI model!

Gemma 2 Chat

And that’s it! You now have your own self‑hosted AI model running with Nanocl, Ollama, and Open WebUI.

리소스

Back to Blog

관련 글

더 보기 »

창고 활용에 대한 종합 가이드

소개 창고는 근본적으로 3‑D 박스일 뿐입니다. Utilisation은 실제로 그 박스를 얼마나 사용하고 있는지를 측정하는 지표입니다. While logistics c...