0

使用 DockerFile 构建 python 应用程序,Library 将从添加的源代码构建

[tool.poetry.dependencies]容器运行时面临问题ModuleNotFoundError: No module named 'rasa_addons'

从 pyproject.ml 捕捉

rasa-addons = {path = "rasa_addons"}

从 DockerFile 中的构建代码中捕捉

RUN python -m venv /opt/venv && \
  . /opt/venv/bin/activate && \
  pip install --no-cache-dir -U 'pip<20' && \
  poetry install --extras full --no-dev --no-root --no-interaction && \
  poetry build -f wheel -n && \
  pip install --no-deps dist/*.whl && \
  rm -rf dist *.egg-info

它出现在 pip 列出的库中

Installing rasa-addons (2.2.5.2 /build/rasa_addons)

4

0 回答 0