0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Difyローカル版インストール

Last updated at Posted at 2025-05-25

環境

項目 内容
OS AlmaLinux9.5
IP 192.168.0.10

準備

DockerとGitをインストールしておく。

# dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
# dnf -y install docker-ce docker-ce-cli containerd.io
# systemctl start docker
# systemctl enable docker
# curl -L "https://github.com/docker/compose/releases/download/v2.36.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
# chmod +x /usr/local/bin/docker-compose
# dnf -y install git
# git config --global user.name "XXXXXX"
# git config --global user.email "XXXXXX@gmail.com"

Dify起動まで

Gitからダウンロードしてくる。
https://github.com/langgenius/dify

# cd /usr/local/src/
# git clone https://github.com/langgenius/dify.git
# cd dify/docker
# cp -p .env.example .env
# docker-compose up -d --build

Difyにアクセス

アカウント作成
http://192.168.0.10/install

ログイン
http://192.168.0.10/signin

モデル追加

設定 > モデルプロバイダー を選択。
利用したいモデルをインストールする。ボタンポチポチでいける。
APIKEY設定をすればモデル利用できるようになる。

Gemini

無料で使えるAPIといえばGeminiがある。
APIKEYは、Google AI StudioのGetAPIKEYから発行できる。
https://aistudio.google.com/prompts/new_chat

設定してチャットボット作ってみたけど返事がない。
サーバーからcurlコマンド打ってみると応答あるんだけど・・・。

Llama3

Geminiがダメだったので、Llamaで試してみる。
こちらはHuggingFaceでAPIKEY取得する。
右上のプロフィールアイコン > AccessTokens > Create new tokenから発行できる。
設定は、Writeを選択、Token nameには適当な名前を設定して発行。
https://huggingface.co/settings/tokens

APIKEYとは別に利用許可が必要。ユーザー情報入力&ライセンス同意して、利用承認が下りれば利用可能となる。
https://huggingface.co/meta-llama/Llama-3.3-70B-Instruct
利用承認待ちは以下のメッセージが表示される。何分か待ったら承認が下りた。承認時は登録のメールアドレスにメールが届きました。

Your request to access this repository has been submitted and is awaiting a review from the repository authors. You can check the status of all your access requests in your settings.

Difyのモデル設定は、
Model Type: LLM
Model Name: meta-llama/Llama-3.3-70B-Instruct
Endpoint Type: Hosted Interface API
API Token:

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?