forked from dusty-nv/jetson-containers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·26 lines (19 loc) · 905 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env bash
set -ex
# Clone the repository if it doesn't exist
git clone --branch=v${CASUALCONV1D_VERSION} --depth=1 --recursive https://github.com/Dao-AILab/causal-conv1d /opt/causalconv1d || \
git clone --depth=1 --recursive https://github.com/Dao-AILab/causal-conv1d /opt/causalconv1d
# Navigate to the directory containing mamba's setup.py
cd /opt/causalconv1d
git apply /tmp/CASUALCONV1D/patch.diff
git diff
git status
MAX_JOBS=$(nproc) \
CAUSAL_CONV1D_FORCE_BUILD="TRUE" \
CAUSAL_CONV1D_SKIP_CUDA_BUILD="FALSE" \
python3 setup.py bdist_wheel --dist-dir=/opt/causalconv1d/wheels
pip3 install --no-cache-dir --verbose /opt/causalconv1d/wheels/causal_conv1d*.whl
cd /opt/causalconv1d
pip3 install 'numpy<2'
# Optionally upload to a repository using Twine
twine upload --verbose /opt/causalconv1d/wheels/causal_conv1d*.whl || echo "Failed to upload wheel to ${TWINE_REPOSITORY_URL}"