-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
I've found that cargo install --version {cargo_contract_version} cargo-contract can eat up to 16GB of RAM (most likely caused by caching the dependencies in RAM) which is a problem in resource-constraint envs like docker (I'm using colima on MacOS instead of the default docker context and it gets 8GB of RAM by default). This is a problem since no building/packaging can happen with cargo-contract installed and the process fails abruptly with no information about the error cause and cryptic Killed.
The workaround to that problem is to do the following (instead of installing it via cargo install):
- In docker cotainer, export https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli
CARGO_NET_GIT_FETCH_WITH_CLI=true - Run
git clone --depth 1 --branch v2.1.0 <git-link> - cd into
cargo-contract. cargo install --path .
For me, the process was peaking at ~700MB instead of 16GB.
Please test yourself first.
andrii-kl
Metadata
Metadata
Assignees
Labels
No labels