Skip to content

i3thuan5/Formosan-AI

Repository files navigation

formosan-asr-cd

local開發

建立 Python virtual environment

python -m venv venv

載入 Python virtual environment

Ta̍k-kái攏ài開,才來開發。

source venv/bin/activate

安裝tox

tox是tī本機走test用--ê。

pip install tox

執行Linter排版器

依需求執行,如:

tox -e yamllint
tox -e flake8

詳細需求可參考tox.ini

更新套件版本

requirements.in是記專案有直接用ê第三方套件。requirements.txt是管kui專案全部第三方套件koh對應版本,保證開發、CI試驗、上線版本一致。

  1. 請先 pip install pip-tools tàu pip-tools 自動管理套件版本。

  2. 手動更新requirements.in

  3. 揀一款指令自動更新套件版本。

    # 有必要--ê才更新
    pip-compile pip-compile asr/requirements.in
    # 盡量更新
    pip-compile --upgrade pip-compile asr/requirements.in
  4. 檢查requirements.txt更新狀態。

local測試

  1. 設定reverse proxy server:
git clone --depth 1 https://github.com/i3thuan5/ZuGi.git
docker compose -f ZuGi/docker-compose.yml up -d --build nginx-proxy
  1. 準備環境變數檔:cp deploy/.env.template .env,並把要測試的服務HOST改成localhost

  2. 編image後啟動:docker compose up -d --build

About

Continuous Deployment for formospeech/formosan-asr

Topics

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •