Fix tch build issue from the root (#180) (#189)

Moved .cargo/config.toml to the root so that the project can be built from the root and burn-tch as well.
This commit is contained in:
Dilshod Tadjibaev 2023-03-01 14:54:37 -06:00 committed by GitHub
parent e6e7f4de42
commit 30f6a30228
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

2
.gitignore vendored
View File

@ -3,4 +3,4 @@ Cargo.lock
# These are backup files generated by rustfmt
**/*.rs.bk
.DS_Store
burn-tch/.cargo/config.toml
.cargo/config.toml

View File

@ -8,7 +8,7 @@ It's a temporary workaround for https://github.com/burn-rs/burn/issues/180
till tch-rs starts using Torch 2.0 libraries.
This script installs torch via pip3 and creates environment variables in
burn-tch/.cargo/config.toml for tch-rs to link cc libs properly.
.cargo/config.toml for tch-rs to link cc libs properly.
"""
@ -27,7 +27,7 @@ def update_toml_config():
import tomli_w
cargo_cfg_dir = pathlib.Path(__file__).parent.parent.joinpath(
"burn-tch/.cargo").resolve()
".cargo").resolve()
cargo_cfg_dir.exists()
if not cargo_cfg_dir.exists():
os.makedirs(cargo_cfg_dir)