-
Notifications
You must be signed in to change notification settings - Fork 3
/
install.sh
45 lines (36 loc) · 1.84 KB
/
install.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash -e
PREFIX=$CONDA_PREFIX
echo $PREFIX
# Build statically linked binary with Rust
C_INCLUDE_PATH=$CONDA_PREFIX/include \
LIBRARY_PATH=$CONDA_PREFIX/lib \
LD_LIBRARY_PATH=$CONDA_PREFIX/lib \
LIBCLANG_PATH=$CONDA_PREFIX/lib/libclang.so \
RUST_BACKTRACE=1 cargo build --release
# Install the binaries
C_INCLUDE_PATH=$PREFIX/include \
LIBRARY_PATH=$PREFIX/lib \
LD_LIBRARY_PATH=$CONDA_PREFIX/lib \
LIBCLANG_PATH=$PREFIX/lib/libclang.so \
RUST_BACKTRACE=1 cargo install --force --root $PREFIX
# Install flight
cd flight/ && pip install . && cd ../
mkdir -p $CONDA_PREFIX/etc/conda/activate.d
touch $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
mkdir -p $CONDA_PREFIX/etc/conda/deactivate.d
touch $CONDA_PREFIX/etc/conda/deactivate.d/env_vars.sh
echo "#!/bin/bash" >> $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
echo "export OLD_LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
echo "export OLD_LIBRARY_PATH=$LIBRARY_PATH" >> $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
echo "export LIBRARY_PATH=$CONDA_PREFIX/lib:${LIBRARY_PATH}" >> $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
echo "export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:${LD_LIBRARY_PATH}" >> $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
echo "#!/bin/bash" >> $CONDA_PREFIX/etc/conda/deactivate.d/env_vars.sh
echo "export LIBRARY_PATH=${OLD_LIBRARY_PATH}" >> $CONDA_PREFIX/etc/conda/deactivate.d/env_vars.sh
echo "export LD_LIBRARY_PATH=${OLD_LD_LIBRARY_PATH}" >> $CONDA_PREFIX/etc/conda/deactivate.d/env_vars.sh
echo "unset OLD_LIBRARY_PATH" >> $CONDA_PREFIX/etc/conda/deactivate.d/env_vars.sh
echo "unset OLD_LD_LIBRARY_PATH" >> $CONDA_PREFIX/etc/conda/deactivate.d/env_vars.sh
# Install spacegraphcats
#cd spacegraphcats/ && pip install . && cd ../
# move Rscript and python
# cp src/bin/snp_density_plots.R $CONDA_PREFIX/bin/
#cp src/bin/cluster.py $CONDA_PREFIX/bin/