投稿

6月, 2026の投稿を表示しています

Mac OSでOllama server (5)一周まわって公式版のollamaに挑戦

llama.cppでサーバーを構築していたが、一点、問題が発生した。サーバー実行中に動的にモデルを変更できないという問題だ。バッチ処理で複数モデルで変えたいのでこれは今回の用途には致命的。ということで一周まわってollamaに戻ってきた。今回は公式サイトでの配付版です。 取りあえず。MacOS版のインストールコマンドでインストール、適当なモデルをダウンロード curl -fsSL https://ollama.com/install.sh | sh ollama run  gemma4:e4b 「システム設定」→「一般」→「ログイン項目。。。」で自動起動を停止。  ~/Library/LaunchAgents/com.ollama.server.plist を作る。 中身は <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://apple.com"> <plist version="1.0"> <dict>     <key>Label</key>     <string>com.ollama.server</string>     <key>ProgramArguments</key>     <array>         <string>/Applications/Ollama.app/Contents/Resources/ollama</string>         <string>serve</string>     </array>     <key>EnvironmentVariables</key>     <dict>   ...

Mac OSでllama.cpp (1) インストール

まずはwgetをインストールして、wget でバイナリーをダウンロードする brew install wget cd Download wget https://github.com/ggml-org/llama.cpp/releases/download/b9537/llama- b9537 -bin-macos-arm64.tar.gz tar -xvf llama- b9357 -bin-macos-arm64.tar.gz cd  llama- b9357 モデルを保存するフォルダーを作って  mkdir model cd model モデルをダウンロードgema4-e4bをダウンロード  huggingfaceから量子化4bitのGGUFのものをダウンロード、リンクをコピーすると、最後に"?download=true"がついているのでこれを消してwgetでダウンロード  wget https://huggingface.co/google/gemma-4-E4B-it-qat-q4_0-gguf/resolve/main/gemma-4-E4B_q4_0-it.gguf ?download=true  llama-b9357のままだとあれなので、llama_cppにディレクトリを変更    ./llama_cpp/llama-server --host 0.0.0.0 --port 8080 --models-dir llama_cpp/models -ngl 99 で起動できる。がサービスにするのがまた手こずっている。 以下のページ参考にちょっと次を進めよう  https://ai.hack-le.com/mac-launchd/  Macで自動化する:launchdを使ってスクリプトを起動時に実行する方法 https://zenn.dev/supertaro/articles/ea48ff146f42a9  Mac Mini M4 (16GB) をサーバー運用で初期化 https://note.com/satoshi_hayasaki/n/neae2e74a2752  Mac mini M4をローカルAIエージェントサーバーに仕立てた全記録【Day 1】...

ubuntuでGUIでL2TP接続

 sudo apt install network-manager-l2tp network-manager-l2tp-gnome でインストール再起動 で設定できる。 名前:適当な名前 l2tp Gateway:L2TPが動いているサーバのIPアドレスまたは名前 Type : パスワード を設定して、IPsecSetting のボタンを押す Enable IPsec tunnel L"TP host をOn Type を Preシェアードキーにしてプレシェアードキーを入力 pppセッティングは特に変更必要ない 参考はと言うか丸パクリですが https://yasuo-ssi.hatenablog.com/entry/2025/11/18/203000 です。

Mac OSでOllama server (4) Homebrew版ollamaアップデート失敗

 Gemma 4 12B を使おうと思ったら、ollamaを最新版にせよというエラーがでるので、最新版にアップデートしようとしたら全然ダメだったはなし。 Error: 500 Internal Server Error: error starting llama-server: llama-server binary not found (checked: /opt/homebrew/Cellar/ollama/0.30.5/libexec/lib/ollama/llama-server, /opt/homebrew/Cellar/ollama/0.30.5/libexec/llama-server, /opt/homebrew/Cellar/ollama/0.30.5/lib/ollama/llama-server, /opt/homebrew/Cellar/ollama/0.30.5/libexec/build/lib/ollama/llama-server, /opt/homebrew/Cellar/ollama/0.30.5/libexec/dist/darwin-arm64/lib/ollama/llama-server, /opt/homebrew/Cellar/ollama/0.30.5/libexec/dist/darwin_arm64/lib/ollama/llama-server, /opt/homebrew/Cellar/ollama/0.30.5/libexec/dist/darwin/llama-server, /opt/homebrew/var/build/lib/ollama/llama-server, /opt/homebrew/var/dist/darwin-arm64/lib/ollama/llama-server, /opt/homebrew/var/dist/darwin_arm64/lib/ollama/llama-server, /opt/homebrew/var/dist/darwin/llama-server). Run 'cmake -S llama/server --preset cpu && cmake --build --preset cpu' first  そのままアップデー...