brew install podman podman-compose docker-compose
% brew install podman podman-compose docker-compose
Warning: podman 5.3.1 is already installed and up-to-date.
To reinstall 5.3.1, run:
brew reinstall podman
Warning: podman-compose 1.2.0 is already installed and up-to-date.
To reinstall 1.2.0, run:
brew reinstall podman-compose
Warning: docker-compose 2.31.0 is already installed and up-to-date.
To reinstall 2.31.0, run:
brew reinstall docker-compose
%
podman machine set --cpus 8 --memory 16384
podman machine ls
podman machine start
% git clone https://github.com/langgenius/dify.git
Cloning into 'dify'...
remote: Enumerating objects: 122407, done.
remote: Counting objects: 100% (28860/28860), done.
remote: Compressing objects: 100% (3069/3069), done.
remote: Total 122407 (delta 26233), reused 26359 (delta 25746), pack-reused 93547 (from 1)
Receiving objects: 100% (122407/122407), 73.29 MiB | 14.00 MiB/s, done.
Resolving deltas: 100% (92006/92006), done.
%
% cd dify/docker
docker % ls
README.md docker-compose.middleware.yaml middleware.env.example startupscripts
certbot docker-compose.png nginx volumes
couchbase-server docker-compose.yaml ssrf_proxy
docker %
docker % cp .env.example .env
docker %
# ------------------------------
# Docker Compose Service Expose Host Port Configurations
# ------------------------------
EXPOSE_NGINX_PORT=8084
EXPOSE_NGINX_SSL_PORT=8484
# ------------------------------
# Vector Database Configuration
# ------------------------------
# The type of vector store to use.
# Supported values are `weaviate`, `qdrant`, `milvus`, `myscale`, `relyt`, `pgvector`, `pgvecto-rs`, `chroma`, `opensearch`, `tidb_vector`, `oracle`, `tencent`, `elasticsearch`, `analyticdb`, `couchbase`, `vikingdb`, `oceanbase`.
VECTOR_STORE=oracle
# ------------------------------
# Environment Variables for Oracle Service
# (only used when VECTOR_STORE is Oracle)
# ------------------------------
ORACLE_PWD=Dify123456
ORACLE_CHARACTERSET=AL32UTF8
# Oracle configuration, only available when VECTOR_STORE is `oracle`
ORACLE_HOST=oracle
ORACLE_PORT=1521
ORACLE_USER=dify
ORACLE_PASSWORD=dify
ORACLE_DATABASE=FREEPDB1
docker % podman compose up -d
>>>> Executing external compose provider "/opt/homebrew/bin/docker-compose". Please see podman-compose(1) for how to disable this message. <<<<
[+] Running 11/11
✔ Network docker_default Created 0.0s
✔ Network docker_ssrf_proxy_network Created 0.0s
✔ Container docker-oracle-1 Started 0.3s
✔ Container docker-web-1 Started 0.2s
✔ Container docker-redis-1 Started 0.3s
✔ Container docker-ssrf_proxy-1 Sta... 0.2s
✔ Container docker-db-1 Started 0.2s
✔ Container docker-sandbox-1 Starte... 0.2s
✔ Container docker-worker-1 Started 0.3s
✔ Container docker-api-1 Started 0.3s
✔ Container docker-nginx-1 Started 0.3s
ynakakoshi@Ns-Macbook docker %
ollama pull lucas2024/llama-3-elyza-jp-8b:q5_k_m
docker % ollama pull paraphrase-multilingual:latest
pulling manifest
pulling aa99ebfc77f4... 100% ▕███████████████████████████████████████▏ 562 MB
pulling 43070e2d4e53... 100% ▕███████████████████████████████████████▏ 11 KB
pulling e700587efa15... 100% ▕███████████████████████████████████████▏ 16 B
pulling 95ef58267922... 100% ▕███████████████████████████████████████▏ 411 B
verifying sha256 digest
writing manifest
success
docker % ollama pull lucas2024/llama-3-elyza-jp-8b:q5_k_m
pulling manifest
pulling 1bc7f8f7512b... 100% ▕███████████████████████████████████████▏ 5.7 GB
pulling dc3cb4f1d01e... 100% ▕███████████████████████████████████████▏ 273 B
pulling 0de69c989f89... 100% ▕███████████████████████████████████████▏ 150 B
pulling fd3131382332... 100% ▕███████████████████████████████████████▏ 98 B
pulling c0db79732798... 100% ▕███████████████████████████████████████▏ 487 B
verifying sha256 digest
writing manifest
success
docker %
podman exec -it docker-oracle-1 bash
docker % podman exec -it docker-oracle-1 bash
bash-4.4$
bash-4.4$ sqlplus dify/dify@localhost/freepdb1
SQL*Plus: Release 23.0.0.0.0 - Production on Fri Dec 13 09:35:36 2024
Version 23.5.0.24.07
Copyright (c) 1982, 2024, Oracle. All rights reserved.
Last Successful login time: Fri Dec 13 2024 09:29:00 +00:00
Connected to:
Oracle Database 23ai Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
Version 23.5.0.24.07
SQL>
SQL> select table_name from user_tables order by 1 asc;
TABLE_NAME
--------------------------------------------------------------------------------
DR$IDX_DOCS_EMBEDDING_VECTOR_INDEX_1B049961_A438_4D42_8CBE_4D0308B42355_NODE$B
DR$IDX_DOCS_EMBEDDING_VECTOR_INDEX_1B049961_A438_4D42_8CBE_4D0308B42355_NODE$C
DR$IDX_DOCS_EMBEDDING_VECTOR_INDEX_1B049961_A438_4D42_8CBE_4D0308B42355_NODE$I
DR$IDX_DOCS_EMBEDDING_VECTOR_INDEX_1B049961_A438_4D42_8CBE_4D0308B42355_NODE$K
DR$IDX_DOCS_EMBEDDING_VECTOR_INDEX_1B049961_A438_4D42_8CBE_4D0308B42355_NODE$N
DR$IDX_DOCS_EMBEDDING_VECTOR_INDEX_1B049961_A438_4D42_8CBE_4D0308B42355_NODE$Q
DR$IDX_DOCS_EMBEDDING_VECTOR_INDEX_1B049961_A438_4D42_8CBE_4D0308B42355_NODE$U
DR$IDX_DOCS_EMBEDDING_VECTOR_INDEX_7570DF07_0C06_4C22_A55D_027C5970124F_NODE$B
DR$IDX_DOCS_EMBEDDING_VECTOR_INDEX_7570DF07_0C06_4C22_A55D_027C5970124F_NODE$C
DR$IDX_DOCS_EMBEDDING_VECTOR_INDEX_7570DF07_0C06_4C22_A55D_027C5970124F_NODE$I
DR$IDX_DOCS_EMBEDDING_VECTOR_INDEX_7570DF07_0C06_4C22_A55D_027C5970124F_NODE$K
TABLE_NAME
--------------------------------------------------------------------------------
DR$IDX_DOCS_EMBEDDING_VECTOR_INDEX_7570DF07_0C06_4C22_A55D_027C5970124F_NODE$N
DR$IDX_DOCS_EMBEDDING_VECTOR_INDEX_7570DF07_0C06_4C22_A55D_027C5970124F_NODE$Q
DR$IDX_DOCS_EMBEDDING_VECTOR_INDEX_7570DF07_0C06_4C22_A55D_027C5970124F_NODE$U
EMBEDDING_VECTOR_INDEX_1B049961_A438_4D42_8CBE_4D0308B42355_NODE
EMBEDDING_VECTOR_INDEX_7570DF07_0C06_4C22_A55D_027C5970124F_NODE
16 rows selected.
SQL>
select index_name, parameters from user_indexes where index_type = 'DOMAIN';
SQL> select index_name, parameters from user_indexes where index_type = 'DOMAIN';
INDEX_NAME
--------------------------------------------------------------------------------
PARAMETERS
--------------------------------------------------------------------------------
IDX_DOCS_EMBEDDING_VECTOR_INDEX_1B049961_A438_4D42_8CBE_4D0308B42355_NODE
FILTER CTXSYS.NULL_FILTER SECTION GROUP CTXSYS.HTML_SECTION_GROUP LEXER sys.my_c
hinese_vgram_lexer
IDX_DOCS_EMBEDDING_VECTOR_INDEX_7570DF07_0C06_4C22_A55D_027C5970124F_NODE
FILTER CTXSYS.NULL_FILTER SECTION GROUP CTXSYS.HTML_SECTION_GROUP LEXER sys.my_c
hinese_vgram_lexer
SQL>
SQL> desc EMBEDDING_VECTOR_INDEX_1B049961_A438_4D42_8CBE_4D0308B42355_NODE
Name Null? Type
----------------------------------------- -------- ----------------------------
ID VARCHAR2(100)
TEXT NOT NULL CLOB
META JSON
EMBEDDING NOT NULL VECTOR(*, *)
SQL> select count(*) from EMBEDDING_VECTOR_INDEX_1B049961_A438_4D42_8CBE_4D0308B42355_NODE;
COUNT(*)
----------
21
SQL> desc EMBEDDING_VECTOR_INDEX_7570DF07_0C06_4C22_A55D_027C5970124F_NODE
Name Null? Type
----------------------------------------- -------- ----------------------------
ID VARCHAR2(100)
TEXT NOT NULL CLOB
META JSON
EMBEDDING NOT NULL VECTOR(*, *)
SQL> select count(*) from EMBEDDING_VECTOR_INDEX_7570DF07_0C06_4C22_A55D_027C5970124F_NODE;
COUNT(*)
----------
139
SQL>