2025년 12월 14일 일요일

Installation for Qwen3-vl:4b on Windows 11

Windows 11에서 Ollama를 설치하고 Qwen3-VL 4B 모델을 돌려본 과정을 정리해 둔다. 텍스트뿐 아니라 이미지도 같이 넣을 수 있는 모델이다. 아래 캡처는 설치할 때 실제로 나온 화면들이다.

먼저 알아둘 것

  • OS는 Windows 10 22H2 이상이면 된다.
  • NVIDIA 그래픽카드를 쓴다면 드라이버가 551.61 이상이어야 한다. GPU가 없어도 CPU로 돌아가긴 하는데 느릴 수 있다.
  • Ollama 설치에 4GB 정도, qwen3-vl:4b 모델 파일이 3.3GB라서 여유 공간을 넉넉히 잡아두는 게 좋다.
  • Qwen3-VL은 Ollama 0.12.7 이상에서 동작한다. 최신 버전을 받으면 문제 없다.

설치 순서 (아래 캡처 순서와 같다)

  1. https://ollama.com 에서 Windows용 OllamaSetup.exe를 받아 실행하고 Install을 누른다. 관리자 권한은 필요 없고 사용자 계정 폴더에 설치된다.
  2. 파일 압축을 푸는 진행 화면이 나오는데 끝날 때까지 기다린다.
  3. 중간에 Microsoft Visual C++ 2015-2022 Redistributable(x64) 설치 창이 뜨면 그대로 진행한다.
  4. 설치가 끝나면 Ollama 앱이 뜬다. 채팅창 오른쪽 아래 모델 선택에서 qwen3-vl:4b를 고르고 아무 메시지나 보내면, 처음 한 번 모델을 내려받은 뒤 대화할 수 있다.

 

https://ollama.com/





















터미널에서 실행하기

PowerShell이나 cmd에서 아래 명령으로도 같은 모델을 쓸 수 있다.

ollama run qwen3-vl:4b

이미지를 넣을 때는 질문 뒤에 이미지 파일 경로를 같이 적어주면 된다.

모델 크기

Ollama 라이브러리 기준으로 2b는 1.9GB, 4b는 3.3GB, 8b는 6.2GB, 30b는 20GB 정도이고 컨텍스트는 전부 256K다. 메모리가 넉넉하지 않으면 2b나 4b가 무난하다.

참고

  • Ollama 서버는 http://localhost:11434 에서 동작해서 API로도 호출할 수 있다.
  • 모델 파일은 기본적으로 %HOMEPATH%\.ollama 에 저장된다. 위치를 바꾸려면 사용자 환경변수 OLLAMA_MODELS를 지정하면 된다.
  • 로그는 %LOCALAPPDATA%\Ollama 폴더의 app.log, server.log에서 볼 수 있다.

용량과 최소 버전은 2026년 10월 기준 Ollama 공식 페이지 내용이라 이후에 바뀔 수 있다.

2023년 3월 13일 월요일

[Docker] docker build RUN apk update Error

Step 3/7 : RUN apk update

 ---> Running in 2fdba320b542

fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz

fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/community/x86_64/APKINDEX.tar.gz

ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.9/main: temporary error (try again later)

WARNING: Ignoring APKINDEX.b89edf6e.tar.gz: No such file or directory

ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.9/community: temporary error (try again later)

WARNING: Ignoring APKINDEX.737f7e01.tar.gz: No such file or directory



$ docker build --tag shlee/springboot-cicd:latest --no-cache --network=host .

 --> Add "--network=host" .. 


[업데이트 2026-10]

  • 컨테이너 안에서 apk 인덱스를 받아오지 못해서 나는 오류다. 빌드하는 동안 컨테이너 네트워크(DNS 포함)가 막혀 있을 때 자주 나고, --network=host를 주면 호스트 네트워크를 그대로 써서 해결되는 경우가 많다.
  • 예제의 Alpine v3.9는 오래된 버전이라 저장소 주소가 더 이상 응답하지 않을 수 있다. 베이스 이미지를 최신 Alpine 태그로 올려서 다시 빌드해 보는 것도 방법이다.

2023년 3월 10일 금요일

Nexus Installation on Ubuntu

$ mkdir nexus

$ wget https://download.sonatype.com/nexus/3/nexus-3.39.0-01-unix.tar.gz

$ sudo apt-get update

$ sudo apt install openjdk-8-jdk-headless

$ cd nexus/bin


- install & startup : nexus run

- startup : nexus start

- stop : nexus stop


SonarQube Installation ( on Ubuntu )

 $ sudo apt update




$ sudo apt -y install apt-transport-https ca-certificates curl gnupg-agent software-properties-common


$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -






$ wget https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-9.8.0.63668.zip


$ unzip sonarqube-9.8.0.63668.zip


$ sudo groupadd sonar


$ sudo useradd -c "SonarQube - User" -d /home/shlee/sonarqube/ -g sonar sonar


# $ sudo chown -R sonar:sonar /home/shlee/sonarqube/


$ sudo chown -R shlee:shlee /home/shlee/sonarqube/




$ /home/shlee/sonarqube/bin/linux-x86-64/sonar.sh start


$ /home/shlee/sonarqube/bin/linux-x86-64/sonar.sh stop




$ curl localhost:9000 [admin/admin and change password]




[SonarQube Setup in gitlab / SonarQube]


1) create gitlab Impersonation Token in Gitlab


2) create gitlab project and insert gitlab Token in sonarqube 


3) create credential for "admin" account in sonarqube 


   and copy credential, paste to jenkins new credentials






[SonarQube Setup In jenkins]


Install GitLab plugin for Jenkins - version 1.5.13 or later


Install SonarQube Scanner plugin for Jenkins - version 2.11 or later




setting for integrating cicd


setting for sonarqube server 




[Jenkinsfile]


  withSonarQubeEnv('sonarqube_rookie01') {


                sh "mvn clean verify sonar:sonar -Dsonar.projectKey=springboot_springboot-cicd_AYUplgxydso4nsDrpk6X"


              }




sonarqube_rookie01 <- ID for sonarQube Server Setting


springboot_springboot-cicd_AYUplgxydso4nsDrpk6X <-- project key in sonarqube


-----




(1) Docker Push in Jenkinsfile


 docker.withRegistry('<Docker Registry URL>', '<Credential defined in Jenkins Credentials>') {


     dockerImage.push('<Tag>')


 }




ex>


 docker.withRegistry('http://localhost:7890/repository/docker-local-registry/', 'docker_credential') {


      dockerImage.push('latest')


 }




(2) Integrate Sonar with Jenkins


 withSonarQubeEnv('<Name of Jenkins SonarQube Server Settings>') {


      sh "mvn clean verify <Goal for SonarQube (default :  'sonar:sonar' )> -Dsonar.projectKey=<ProjectKey generated by SonarQube Server>"


 }

Prometheus & Grafana Installation (on Ubuntu)

 [Prometheus]


1) download prometheus

$ wget http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz

압축 해제.. & prometheus.yml 편집

scrape_configs:

  # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.

  - job_name: "prometheus"


    # metrics_path defaults to '/metrics'

    # scheme defaults to 'http'.

    static_configs:

      - targets: ["localhost:9091"]

      - 

  - job_name: "springboot"

    scrape_interval: 15s

    metrics_path: "/actuator/prometheus"

    static_configs:

      - targets: ["rookie01.local:8080"]

      - 

2) startup

$ ./prometheus --config.file=prometheus.yml  --web.listen-address="0.0.0.0:9091" --web.enable-lifecycle 2>&1 | tee -a ./startup.log &



3) shutdown

$ curl -X POST localhost:9091/-/quit   ( or kill )


4) brower 접속

http://localhost:9091

http://localhost:9091/metrics



[Grafana]

1) download installation file

$ wget wget https://dl.grafana.com/enterprise/release/grafana-enterprise-9.3.6.linux-amd64.tar.gz


2) startup

$ ./bin/grafana-server web


3) browser 접속

http://localhost:3000  ( admin / admin ; pwd 변경 : lsh~)


4) springboot 용 pannel 샘플 다운로드 / Import

 download from : https://grafana.com/grafana/dashboards/12900-springboot-apm-dashboard/

2020년 3월 27일 금요일

Push Docker Image to GCR from WSL

shlee@DESKTOP-FEERFQV:~$ docker images
REPOSITORY                                       TAG                 IMAGE ID            CREATED             SIZE
asia.gcr.io/sunlit-theory-262204/config-server   latest              f9559cb4a95e        25 hours ago        135MB
test/configserver                                latest              f9559cb4a95e        25 hours ago        135MB
openjdk                                          8-jdk-alpine        a3562aa0b991        10 months ago       105MB
hello-world                                      latest              fce289e99eb9        15 months ago       1.84kB

shlee@DESKTOP-FEERFQV:~$ docker push asia.gcr.io/sunlit-theory-262204/config-server
WARNING: Could not open the configuration file: [/home/shlee/.config/gcloud/configurations/config_default].
ERROR: (gcloud.auth.docker-helper) You do not currently have an active account selected.
Please run:

  $ gcloud auth login

to obtain new credentials, or if you have already logged in with a
different account:

  $ gcloud config set account ACCOUNT

to select an already authenticated account to use.
The push refers to repository [asia.gcr.io/sunlit-theory-262204/config-server]
9bb9d4296990: Preparing
ceaf9e1ebef5: Preparing
9b9b7f3d56a0: Preparing
f1b5933fe4b5: Preparing
unauthorized: You don't have the needed permissions to perform this operation, and you may have invalid credentials. To authenticate your request, follow the steps in: https://cloud.google.com/container-registry/docs/advanced-authentication
shlee@DESKTOP-FEERFQV:~$ gcloud auth login
Go to the following link in your browser:

    https://accounts.google.com/o/oauth2/auth?code_challenge=VHaWsnL6HYckYTK5KVqT9h2IW8kjR8sGWUy4x_-IqTw&prompt=select_account&code_challenge_method=S256&access_type=offline&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&response_type=code&client_id=32555940559.apps.googleusercontent.com&scope=openid+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fappengine.admin+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcompute+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Faccounts.reauth


Enter verification code: <Hidden>

You are now logged in as [lshyuk@gmail.com].
Your current project is [None].  You can change this setting by running:
  $ gcloud config set project PROJECT_ID

shlee@DESKTOP-FEERFQV:~$ gcloud config set project sunlit-theory-262204
Updated property [core/project].


shlee@DESKTOP-FEERFQV:~$ docker push asia.gcr.io/sunlit-theory-262204/config-server
The push refers to repository [asia.gcr.io/sunlit-theory-262204/config-server]
9bb9d4296990: Pushed
ceaf9e1ebef5: Layer already exists
9b9b7f3d56a0: Layer already exists
f1b5933fe4b5: Layer already exists
latest: digest: sha256:5b309a37ba393e74461b10eb52c96b4dc670425b1ba546ffa27f618e607ef6d5 size: 1159




2020년 3월 22일 일요일

Install gcloud on WSL (Ubuntu)

1) Run WSL

2) Add the Cloud SDK distribution URI as a package source
$ echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
3) Install apt-transport-https
$ sudo apt-get install apt-transport-https ca-certificates gnupg

4) Import the Google Cloud Platform public key
$ curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -

5) Update the package list and install the Cloud SDK
$ sudo apt-get update && sudo apt-get install google-cloud-sdk

6) Install Additional Component
$ sudo apt-get install google-cloud-sdk-app-engine-java

7) Start gcloud
$ gcloud init

2020년 3월 20일 금요일

docker-compose error (Unable to enable NAT rule)

$ docker-compose up -d
Creating network "chapter04_default" with the default driver
ERROR: Failed to Setup IP tables: Unable to enable NAT rule:  (iptables failed: iptables --wait -t nat -I POSTROUTING -s 172.21.0.0/16 ! -o br-8cbf06e4b2c9 -j MASQUERADE: iptables: No chain/target/match by that name.
 (exit status 1))

[Fix]
$ sudo vi /etc/docker/daemon.json
{
    "iptables":false
}

and then..

restart dockerd

2020년 3월 17일 화요일

Setting or change WSL root password

1. Open PowerShell Console
2. Comand
PS C:\Users\holyx> wsl -u root
root@LAPTOP-EEH80F78:/mnt/c/Users/holyx#
root@LAPTOP-EEH80F78:/mnt/c/Users/holyx# passwd
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully