在Ubuntu容器中无法运行EXLA
关于本文
在Ubuntu容器中尝试运行EXLA时遇到了依赖关系的问题,因此将其留作备忘录。
环境
-
- macOS Ventura 13.2.1
-
- Rancher Desktop 1.7.0
-
- Ubuntu 22.04.1 LTS (Jammy Jellyfish)
-
- Erlang 25.2.3
-
- Elixir 1.14.3
-
- Nx 0.5.1
- EXLA 0.5.1
解决方法
FROM hexpm/elixir:1.14.3-erlang-25.2.3-ubuntu-jammy-20221130
# For EXLA (xla)
RUN apt-get upgrade -y \
&& apt-get update \
&& apt-get install --no-install-recommends -y \
curl \
build-essential \
ca-certificates \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
遇到错误并采取对策
** (RuntimeError) expected either curl or wget to be available in your system, but neither was found
→ 安装 curl
** (RuntimeError) could not find v0.4.4 release under https://github.com/elixir-nx/xla/releases
→ ca-certificates 安装(以支持 HTTPS 连接)
** (Mix) "make" not found in the path. If you have set the MAKE environment variable,
please make sure it is correct.
→ 安装 build-essential