본문 바로가기

[LLM] Ollama Local 설치 본문

공부

[LLM] Ollama Local 설치

Savedata 2024. 5. 28. 17:44

오프라인망에 LLM을 구축해보고자 하는 삽질ing.

LLM의 예제 코드들과 ollama공식 사이트의 안내방식이 모두 인터넷이 되야하는 환경이라 인터넷이 되는 conda 환경에서 local로 ollama를 구축하고 옮겨보려 하는 trial & error 일지

 

WSL(Windows Subsystem for Linux)에 Anaconda 설치 후 ollama:gemma 환경 구성 및 export

 

목차

 

1. WSL 구성

2. Ollama 환경 구성

3. Conda 환경 export

4. 정상구동 테스트

추천글

위의 목차를 클릭하면 해당 글로 자동 이동 합니다.

 

1. WSL 구성

 WSL(Windows Subsystem for Linux)을 이용하여 윈도우 상에 리눅스 운영체제를 깔아보자.

위의 명령어로 굉장히 간단하게 구성 자체는 끝난다.


microsoft store에서 ubuntu를 검색하여 설치를 누른다.

잠시 기다리면

설치가 끝나고 window에 ubuntu가 돌아간다. (이렇게 쉽다니...)

정말 쉽게 설치가 끝났다.


그러나 반전으로 WSL이 1버전이라 conda 설치 및 ollama 설정이 안되는 에러를 만나 버렸다.

wsl --set-version <distro name> 2

이와 같은 명령어를 치면 버전 2로 업그레이드 해준다.


%참고로 이미 설치된 WSL에 다시 접속하는 방법은 다음과 같다.

2. Ollama 환경 구성

아주 단순한 명령어만으로도 ollama 모델을 가져올 수 있고, 바로 이용해 볼 수 있다.

3. Conda 환경 구성

wget https://repo.anaconda.com/archive/Anaconda3-2021.11-Linux-x86_64.sh
sh Anaconda3-2021.11-Linux-x86_64.sh

기본적으로 conda는 위 두 명령어만 입력하면 바로 설치가 된다.

다만, 바로는 conda 명령어가 수행되지 않고 아래의 명령어를 적고 command 창을 다시 들어오면

다음과 같이 잘 수행된다.

4. Conda Ollama 환경 구성

conda 상에 필요한 라이브러리까지 설치.

 

설치된 환경을 다뤄보는 것으로 다음 글을 작성 예정.

 

추천글

Langchain Quickstart

 

Quickstart | 🦜️🔗 LangChain

In this quickstart we'll show you how to:

python.langchain.com

Conda Ollama install

 

Getting Started with Local LLMs using Ollama

Check Out my Starter Guide on Local LLMs on Github to setup and start working with local, open-source, free-of-cost and private Large Language Models! Ollama-Local-LLM Getting started with Ollama and self-hosting Large Language Models for local AI solution

www.linkedin.com

Github Ollama conda-forge

 

GitHub - conda-forge/ollama-feedstock: A conda-smithy repository for ollama.

A conda-smithy repository for ollama. Contribute to conda-forge/ollama-feedstock development by creating an account on GitHub.

github.com

Ollama Github

 

GitHub - ollama/ollama: Get up and running with Llama 3, Mistral, Gemma, and other large language models.

Get up and running with Llama 3, Mistral, Gemma, and other large language models. - ollama/ollama

github.com

 

'공부' 카테고리의 다른 글

[LLM] Colab langchain 실습  (0) 2024.05.22
[LLM] 자습 중. 참고 목록 모음집  (0) 2024.05.13
[LLM] 시작  (0) 2024.04.22
타닥타닥17: Superset Chart 및 Dashboard구성2  (0) 2023.08.15
타닥타닥16: Superset User&Role  (0) 2023.06.20
Comments