Skip to content

Commit

Permalink
chore: update.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrvollger committed Oct 20, 2023
1 parent e6e45a3 commit 1e08da2
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 54 deletions.
29 changes: 14 additions & 15 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI

on:
push:
branches: [ main, master, dev, development ]
branches: [main, master, dev, development]
pull_request:
branches: [ main, master ]
branches: [main, master]

jobs:
Formatting:
Expand All @@ -24,20 +24,20 @@ jobs:
run: cargo fmt -- --check

Linting:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: clippy
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: clippy

- name: Lint with clippy
run: docker run -i $(docker build --pull -q .) cargo clippy --release
- name: Lint with clippy
run: docker run -i $(docker build --pull -q .) cargo clippy --release

Testing:
needs: Formatting
Expand All @@ -55,4 +55,3 @@ jobs:
- name: Run test
run: |
docker run -i $(docker build --pull -q .) cargo test -p bio-io -p bamlift -p fibertools-rs --release -- --test-threads=1
49 changes: 10 additions & 39 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
FROM ubuntu:20.04

# Update default packages
RUN apt-get update
FROM pytorch/pytorch:2.1.0-cuda12.1-cudnn8-runtime

# stop time prompt
ARG DEBIAN_FRONTEND=noninteractive

# Update new packages
RUN apt-get update

# Get Ubuntu packages
RUN apt-get install -y \
build-essential \
curl \
wget \
zip \
cmake \
git \
autoconf \
automake \
make \
gcc \
perl \
zlib1g-dev \
libbz2-dev \
liblzma-dev \
Expand All @@ -32,39 +30,12 @@ RUN apt-get update
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"


# Install libtorch
WORKDIR /src/fibertools-rs
ENV TORCH_VERSION="2.1.0"
# "cu117" or "cu118" or "cpu"
ENV INSTALL_TYPE="cpu"
ENV PY_URL="https://download.pytorch.org/libtorch/${INSTALL_TYPE}/libtorch-shared-with-deps-${TORCH_VERSION}%2B${INSTALL_TYPE}.zip"
#ENV PY_URL="https://download.pytorch.org/libtorch/${INSTALL_TYPE}/libtorch-cxx11-abi-shared-with-deps-${TORCH_VERSION}%2B${INSTALL_TYPE}.zip"
RUN wget ${PY_URL}
RUN unzip "libtorch-*${TORCH_VERSION}+${INSTALL_TYPE}.zip"
ENV LIBTORCH=/src/fibertools-rs/libtorch
ENV LD_LIBRARY_PATH=${LIBTORCH}/lib:$LD_LIBRARY_PATH
#ENV LIBTORCH_CXX11_ABI=0
RUN ls $LIBTORCH/lib

COPY . .

RUN cargo build --release && cp ./target/release/ft /usr/local/bin/ft

RUN ft --help


#RUN cargo install --path . --root /usr/local
# use the install pytroch from docker image
ENV LIBTORCH_USE_PYTORCH=1
RUN python checkpy.py
RUN ls "/opt/conda/lib/python3.10/site-packages/torch/lib/"

# Install HTSlib
# RUN wget https://github.com/samtools/htslib/releases/download/1.18/htslib-1.18.tar.bz2
# RUN tar -xjvf htslib-1.18.tar.bz2
# WORKDIR /htslib-1.18
# RUN ./configure
# RUN make
# RUN make install


#RUN wget "https://github.com/fiberseq/fibertools-rs/archive/refs/tags/v${FT_VERSION}.tar.gz"
#RUN tar -xzf "v${FT_VERSION}.tar.gz"
#RUN cd fibertools-rs-${FT_VERSION} && ls &&
RUN cargo build --release && cp ./target/release/ft /usr/local/bin/ft
RUN ft --help

0 comments on commit 1e08da2

Please sign in to comment.