You will need Git, Rustup, Python 3(v3.8+), the Node.js active LTS (v16.17.0), yarn, and npm (v8+).
If you are using Ubuntu/Debian, please additionally install:
> apt install build-essential python3-dev python3-pip openssl git libgit2-dev
If you are using Fedora/Centos, please additionally install:
> dnf install base-devel python3-devel python3-pip openssl-devel git libgit2-devel
x86_64-pc-windows-msvc target is required. Compiling with windows-gnu target will not be successful.
Follow Visual Studio guide to install msvc
For macOS,you can't use the python3 that comes with the system because it's static linked and no dylib. You can install python3 with dylib from conda/miniconda3/brew.
copy .cargo/config.toml and edit it to where your python installed
> cp .cargo/config.toml.example .cargo/config.toml
> curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
> source "$HOME/.cargo/env"
edit .cargo/config.toml
[target.x86_64-apple-darwin]
rustflags = ["-L", "/opt/homebrew/lib/", "-C", "link-arg=-undefined", "-C", "link-arg=dynamic_lookup"]
[env]
PYO3_PYTHON="/opt/homebrew/bin/python3"
Modify .cargo/config.toml as follows:
(note that you need to replace CONDA_PREFIX
with
the output of echo $CONDA_PREFIX
from your terminal.)
[target.x86_64-apple-darwin]
rustflags = ["-C", "link-arg=-undefined", "-C", "link-arg=dynamic_lookup", "-C", "link-arg=-Wl,-rpath,`CONDA_PREFIX`/lib"]
> ./scripts/build.sh
> ./target/release/idp
> docker build -t note -f Dockerfile --target release .
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。