---
# System prepended metadata

title: AWS / 容器執行個體(EC2) / 安裝 Parabricks 軟體
tags: [Clara, Parabricks-v3.8, 基因體, 二級分析, NVIDIA, Parabricks]

---

AWS / 容器執行個體(EC2) / 安裝 Parabricks 軟體
===
###### tags: `Parabricks-v3.8`
###### tags: `基因體`, `NVIDIA`, `Clara`, `Parabricks`, `二級分析`

<br>

[TOC]

<br>

## 前置作業：準備 VM
[[hackMD] AWS / 容器執行個體(EC2)](https://hackmd.io/QavypnMBRoW8P9aH4gw8FA)

<br>

<hr>

<br>

## Install Parabricks
> 參考資料
> - [parabricks / v3.7.0-by-tj / step1_download_tools.sh](http://10.78.26.44:30000/Tj_Tsai/parabricks/-/blob/master/v3.7.0-by-tj/step1_download_tools.sh#L31)
> - [parabricks / v3.7.0-by-tj / Dockerfile](http://10.78.26.44:30000/Tj_Tsai/parabricks/-/blob/master/v3.7.0-by-tj/Dockerfile#L60)

- ### 安裝指令
    :::warning
    :warning: :warning: :warning: 要先安裝 cuda driver API -> `$ nvidia-smi`
    否則安裝 `parabricks.deb` 會有 error:
    > ERROR: please make sure cuda and nvcc are set and your PATH is updated before installing parabricks
    :::
    ```bash
    # install parabricks.deb
    $ wget --content-disposition https://api.ngc.nvidia.com/v2/resources/nvidia/clara/parabricks_bare_metal_debian_package/versions/3.7.0-1/files/parabricks_3.7.0-1_amd64.deb -O parabricks_3.7.0-1_amd64.deb \
        && apt update \
        && apt install -y ./parabricks_3.7.0-1_amd64.deb --fix-missing \
        && echo "pbrun version:" \
        && pbrun version
    ```
    ```bash
    # install miniconda & setup
    $ wget -q https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
      && chmod +x ./Miniconda3-latest-Linux-x86_64.sh \
      && ./Miniconda3-latest-Linux-x86_64.sh -b \
      &&  /home/ubuntu/miniconda3/bin/conda init bash
      
    $ conda create -y --name parabricks \
          -c conda-forge -c bioconda \
          python=3.7 Cython matplotlib pysam wheel vcflib
    ```
    ```
    # install license.bin
    $ sudo cp license.bin /usr/local/parabricks/
    ```
- ### parabricks_3.7.0-1_amd64.deb 需要 python 3.7
    :::warning
    :bulb: **在 Ubuntu 20.04 會遇到，但後來改在 Ubuntu 18.04 就沒有出現這個訊息**
    :::
    ![](https://i.imgur.com/WpBk52f.png)
    - 一種是在全域安裝 python3.7
        ```
        $ sudo apt-get install software-properties-common
        $ sudo add-apt-repository ppa:deadsnakes/ppa
        $ sudo apt install -y python3.7
        ```
    - 另一種是在 conda 環境安裝 python3.7
    
- ### `libboost_filesystem.so.1.65.1`: No such file or directory
    :::warning
    :bulb: **在 Ubuntu 20.04 會遇到，但後來改在 Ubuntu 18.04 就沒有出現這個訊息**
    
    在 Ubuntu 18.04 有此檔案：
    ![](https://i.imgur.com/yFsFovd.png)
    `/usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1`
    :::
    ```
    PARABRICKS: error while loading shared libraries: libboost_filesystem.so.1.65.1: cannot open shared object file: No such file or directory
    ```
    ![](https://i.imgur.com/EH5fBPE.png)
    
    在 `/usr/lib/x86_64-linux-gnu/` 下發現更新的版本
    ![](https://i.imgur.com/StnVlRt.png)
    i.e. 1.71.0 存在於 Ubuntu 20.04
    
    且從 [libboost-filesystem1.65.1_1.65.1+dfsg-0ubuntu5_amd64.deb](https://ubuntu.pkgs.org/18.04/ubuntu-main-amd64/libboost-filesystem1.65.1_1.65.1+dfsg-0ubuntu5_amd64.deb.html) 發現
    ![](https://i.imgur.com/5o6WowW.png)
    libboost-filesystem1.65.1_1.65.1 應該只有 Ubuntu18 才有

- ### pbrun germline 需要 conda env parabricks
    ![](https://i.imgur.com/YqeGKxS.png)
