PR

[Dify]macOSでRancher Desktopを使うと”error while creating mount source path”が出てDifyが起動しない問題

macOS

問題

macOSでDifyをDocker起動しようと思ったらエラーが出たので対策方法をメモとして残します。

環境

  • macOS Sequoia 15.3.1
  • Rancher Desktop 1.18.0
  • Dify 1.0.1

手順

まずは公式のGitHubからクローンします。

GitHub - langgenius/dify: Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, ...

次にREADME.mdに記載している通りにDocker Composeを使いDifyを起動します

cd dify
cd docker
cp .env.example .env
docker compose up -d

すると「error while creating mount source path」というエラーが出てDifyを起動することができません。

% docker compose up -d
[+] Running 9/12
  Network docker_default             Created                                          0.1s
  Network docker_ssrf_proxy_network  Created                                          0.1s
  Container docker-ssrf_proxy-1      Started                                          0.8s
  Container docker-redis-1           Starting                                         0.8s
  Container docker-sandbox-1         Started                                          0.7s
  Container docker-db-1              Starting                                         0.8s
  Container docker-web-1             Started                                          0.8s
  Container docker-weaviate-1        Starting                                         0.8s
  Container docker-plugin_daemon-1   Created                                          0.0s
  Container docker-api-1             Created                                          0.0s
  Container docker-worker-1          Created                                          0.0s
  Container docker-nginx-1           Created                                          0.0s
Error response from daemon: error while creating mount source path '/Users/xxxxxxxx/test/dify/docker/volumes/redis/data': chown /Users/xxxxxxxx/test/dify/docker/volumes/redis/data: permission denied

対策方法

どうやら原因はRancher Desktopにあったようです。

PreferencesからVolumesEmulationを以下のように変更します。

項目設定値
Volumesvirtiofs
EmulationVZ

結果

無事、起動するようになりました!

% docker compose up -d
[+] Running 10/10
  Container docker-web-1            Running                                                                                         0.0s 
  Container docker-redis-1          Running                                                                                         0.0s 
  Container docker-weaviate-1       Running                                                                                         0.0s 
  Container docker-db-1             Running                                                                                         0.0s 
  Container docker-ssrf_proxy-1     Running                                                                                         0.0s 
  Container docker-sandbox-1        Running                                                                                         0.0s 
  Container docker-api-1            Running                                                                                         0.0s 
  Container docker-worker-1         Started                                                                                         0.5s 
  Container docker-plugin_daemon-1  Started                                                                                         0.3s 
  Container docker-nginx-1          Started                                                                                         0.4s 

Webブラウザからアクセスもできるようになってます!

リンク

Dify.AI · 先進的なAIアプリケーションのためのイノベーションエンジン
先進的なAIアプリケーションのためのイノベーションエンジン
Rancher Desktop by SUSE
Open source desktop application that provides Kubernetes, Container Management, bundled utilities on the desktop

コメント

タイトルとURLをコピーしました