Speed up file transfers with the B10 Infra.
Project description
Truss-Transfer
Python-optional download utility
pip install truss_transfer
# pip install /workspace/model-performance/michaelfeil/truss/truss-transfer/target/wheels/truss_transfer-0.1.0-cp39-cp39-manylinux_2_34_x86_64.whl
import truss_transfer
def lazy_data_loader(download_dir: str, num_workers: int = 64):
print(f"download using {truss_transfer.__version__}")
try:
truss_transfer.lazy_data_resolve(str(download_dir), int(num_workers))
except Exception as e:
print(f"Lazy data resolution failed: {e}")
raise
Running the CLI as binary
# To build with cargo:
cargo build --release --bin truss_transfer_cli --features cli
# To run the binary
./target/release/truss_transfer_cli /tmp/ptr 4
Building a wheel from source
Prerequisites:
# apt-get install patchelf
# Install rust via Rustup https://www.rust-lang.org/tools/install
pip install maturin==1.8.1
This will build you the wheels for your current python3 --version.
The output should look like this:
maturin build --release
🔗 Found pyo3 bindings
🐍 Found CPython 3.9 at /workspace/model-performance/michaelfeil/.asdf/installs/python/3.9.21/bin/python3
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.75s
🖨 Copied external shared libraries to package truss_transfer.libs directory:
/usr/lib/x86_64-linux-gnu/libssl.so.3
/usr/lib/x86_64-linux-gnu/libcrypto.so.3
📦 Built wheel for CPython 3.9 to /workspace/model-performance/michaelfeil/truss/truss-transfer/target/wheels/truss_transfer-0.1.0-cp39-cp39-manylinux_2_34_x86_64.whl
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
truss_transfer-0.0.1rc0.tar.gz
(17.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file truss_transfer-0.0.1rc0.tar.gz.
File metadata
- Download URL: truss_transfer-0.0.1rc0.tar.gz
- Upload date:
- Size: 17.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a198d03e3204bc8bfc13c2251a8bd229209573b471b163583bf3eb010224d5d
|
|
| MD5 |
6c8ad3ac59f6cb3626d110648dc3517c
|
|
| BLAKE2b-256 |
039c9adc2add3d95241cfd9851f4124b0e557968a9c780bd63e6a6b4024888eb
|
File details
Details for the file truss_transfer-0.0.1rc0-cp38-abi3-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: truss_transfer-0.0.1rc0-cp38-abi3-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 3.6 MB
- Tags: CPython 3.8+, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58282a9b19d12e8015a17da529805999e1ecd8324d628353af88b643d940cf8b
|
|
| MD5 |
70ac4298ad1247831c801d897c832efc
|
|
| BLAKE2b-256 |
1f80c1704aadfbbc08b47b7b59ac6badeecae172c164b43eeacd5102bb459a4a
|