如何编译 llama factory 镜像

[复制链接]
43 0

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

x
尝试了 mxc500-torch2.0-py38-mc2.32.0.3-ubuntu20.04-amd64.container.xz 和 mxc500-torch2.1-py310-mc2.23.0.5-ubuntu22.04-x86_64.container.xz 这两个基础镜像,然后按 llamafactory 的官方文档进行编译 (https://github.com/hiyouga/LLaMA ... v-file#build-docker)



报错如下
  1. >> docker compose up -d
  2. [+] Building 0.4s (9/13)                                                                                                                        docker:desktop-linux
  3. => [llamafactory internal] load build definition from Dockerfile                                                                                               0.0s
  4. => => transferring dockerfile: 3.02kB                                                                                                                          0.0s
  5. => [llamafactory internal] load metadata for docker.io/library/mxc500-torch2.1-py310:mc2.32.0.3-ubuntu22.04-amd64                                              0.0s
  6. => [llamafactory internal] load .dockerignore                                                                                                                  0.0s
  7. => => transferring context: 165B                                                                                                                               0.0s
  8. => [llamafactory 1/9] FROM docker.io/library/mxc500-torch2.1-py310:mc2.32.0.3-ubuntu22.04-amd64                                                                0.0s
  9. => [llamafactory internal] load build context                                                                                                                  0.0s
  10. => => transferring context: 15.42kB                                                                                                                            0.0s
  11. => CACHED [llamafactory 2/9] WORKDIR /app                                                                                                                      0.0s
  12. => CACHED [llamafactory 3/9] RUN if [ -n "" ]; then     echo "Configuring proxy...";     export http_proxy=;     export https_proxy=;     fi                   0.0s
  13. => CACHED [llamafactory 4/9] COPY requirements.txt /app                                                                                                        0.0s
  14. => ERROR [llamafactory 5/9] RUN pip config set global.index-url "https://pypi.org/simple" &&     pip config set global.extra-index-url "https://pypi.org/simp  0.3s
  15. ------
  16. > [llamafactory 5/9] RUN pip config set global.index-url "https://pypi.org/simple" &&     pip config set global.extra-index-url "https://pypi.org/simple" &&     python -m pip install --upgrade pip &&     if [ -n "" ]; then     python -m pip install --proxy= -r requirements.txt;     else     python -m pip install -r requirements.txt;     fi:
  17. 0.225 /bin/sh: 1: pip: not found
  18. ------
  19. failed to solve: process "/bin/sh -c pip config set global.index-url "$PIP_INDEX" &&     pip config set global.extra-index-url "$PIP_INDEX" &&     python -m pip install --upgrade pip &&     if [ -n "$HTTP_PROXY" ]; then     python -m pip install --proxy=$HTTP_PROXY -r requirements.txt;     else     python -m pip install -r requirements.txt;     fi" did not complete successfully: exit code: 127
复制代码
根据报错信息应该是容器内没有 pip,我尝试了使用 python -m pip XXX,也报错,连 python 都没有。

请问有没有解决方案?
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

©沐曦 沪ICP备2020031767号-1
快速回复 返回顶部 返回列表