2025/5/3

亂記一些

這邊是有關 deepwiki-open:

從Dockerfil 看到 python 是 3.11
python 啟動的是 backend server,用 npm run 啟動的是 fron-end.
fron end 原來 listen on localhost,用 npm run 的 command:
npm run dev -- -H 0.0.0.0
就可以改到 public ip
使用 docker compose up 的話,使用 ollam 時,要修改:
diff --git a/docker-compose.yml b/docker-compose.yml
index a7d42c3..b1d85d3 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -3,6 +3,7 @@ version: '3.8'
 services:
   deepwiki:
     build: .
+    network_mode: host
     ports:
       - "${PORT:-8001}:${PORT:-8001}"  # API port
       - "3000:3000"  # Next.js port
把 contrainer 的 localhost:11434 使用 host 的,才能跟 ollama 連接。

原來他的 front-end, ts code,連到 localhost,所以是連到 browser 所在主機的 localhost,不是 server ...
所以要 修改 client side 的 SERVER_BASE_URL,用 server 的 ip:
diff --git a/docker-compose.yml b/docker-compose.yml
index a7d42c3..210e476 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -3,6 +3,7 @@ version: '3.8'
 services:
   deepwiki:
     build: .
     ports:
       - "${PORT:-8001}:${PORT:-8001}"  # API port
       - "3000:3000"  # Next.js port
@@ -11,6 +12,6 @@ services:
     environment:
       - PORT=${PORT:-8001}
       - NODE_ENV=production
-      - NEXT_PUBLIC_SERVER_BASE_URL=http://localhost:${PORT:-8001}
+      - NEXT_PUBLIC_SERVER_BASE_URL=http://192.168.145.77:${PORT:-8001}
     volumes:
       - ~/.adalflow:/root/.adalflow  # Persist repository and embedding data
發現沒辦法support gitlab 的 subgroup,因為會和產生的 page 的 path 混在一起,而 source code 的result http server 頁面是依照source path 安排的。
更新後發現支援 local path,所以就 clone 到 local disk 後再給 path 就可以。
這邊的 local 又變成 server 的 local,不是 browser 的 local。
所以都要在 run 的那台 server 上clone source 之後,給 full path.


  • DeepWiki opensource implement
  • huggingface agent : smolagents, E2B Desktop, Qwen2-VL-72B-Instruct
  • LTX-Video : ComfyUI
  • uv




還有今天apt update/upgrade 後,lcd backlight 又失效了。
然後進入additional driver 設定想換 driver 出現 Error。
要反悔又不行。
一直出現 要 apt --fix-broken install
但是又會出現 overwrite error /var/.../*.deb,
所以只好 follow stackoverflow 說明,用 apt -i --force-overwrite /var/..../*.deb 來強制 install
sudo dpkg --force-overwrite /var/cache/apt/archives/libnvidia-common-570-server_570.133.20-0ubuntu0.24.04.1_all.deb
最後還是 fail 因為unpack 某個 deb 出現 /usr/share/nvidia/files.d/sandboxutils-filelist.json 無法overwrite,
去看這個是 folder ,所以無法 overwrite,rename 後就可以了,然後那個 deb 就 create 了一個同名 file。
繼續 apt fix,出現 error,照次說 sandboxutils-filelist.json 無法 rmdif,--- 因為他是 file 呀!
所以就去把 file 刪掉,把剛剛rename 的 folder rename 回來。
才完成 fix
查 sandboxutils-filelist.json 目錄下有一個同名檔案,他的內容跟 file 的內容是一致的。
髓以我猜某一個 deb 稿錯了。

然後剛剛又 apt update, apt list --upgradable 看到 cuda-driver 有更新 575....
所以是更新成 575 造成 ? 還是要更新 575 才會 fix ?



要用 transformer run phi4-multimodal 要 install flash-attention:
pip install flash-attn --no-build-isolation
然後會用 cicc build 很久...

另外還要:
soundfile peft backoff 
結果phi4-multimodal 太大... 超過 24G..



enable conda in powershell,要 run
PS C:\Users\charles.chang> conda init powershell
no change     D:\miniconda\Scripts\conda.exe
no change     D:\miniconda\Scripts\conda-env.exe
no change     D:\miniconda\Scripts\conda-script.py
no change     D:\miniconda\Scripts\conda-env-script.py
no change     D:\miniconda\condabin\conda.bat
no change     D:\miniconda\Library\bin\conda.bat
no change     D:\miniconda\condabin\_conda_activate.bat
no change     D:\miniconda\condabin\rename_tmp.bat
no change     D:\miniconda\condabin\conda_auto_activate.bat
no change     D:\miniconda\condabin\conda_hook.bat
no change     D:\miniconda\Scripts\activate.bat
no change     D:\miniconda\condabin\activate.bat
no change     D:\miniconda\condabin\deactivate.bat
modified      D:\miniconda\Scripts\activate
modified      D:\miniconda\Scripts\deactivate
modified      D:\miniconda\etc\profile.d\conda.sh
modified      D:\miniconda\etc\fish\conf.d\conda.fish
no change     D:\miniconda\shell\condabin\Conda.psm1
modified      D:\miniconda\shell\condabin\conda-hook.ps1
no change     D:\miniconda\Lib\site-packages\xontrib\conda.xsh
modified      D:\miniconda\etc\profile.d\conda.csh
modified      D:\OneDrive\OneDrive - Royaltek\文件\WindowsPowerShell\profile.ps1

==> For changes to take effect, close and re-open your current shell. <==

沒有留言:

張貼留言