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 fd321d9 commit ff5759e
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 11 deletions.
29 changes: 20 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM ubuntu:20.04

ENV FT_VERSION="0.3.6"

# Update default packages
RUN apt-get update

Expand Down Expand Up @@ -29,9 +31,9 @@ RUN apt-get install -y \
RUN apt-get update

# Install HTSlib
RUN wget https://github.com/samtools/htslib/releases/download/1.17/htslib-1.17.tar.bz2
RUN tar -xjvf htslib-1.17.tar.bz2
WORKDIR /htslib-1.17
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
Expand All @@ -43,15 +45,24 @@ ENV PATH="/root/.cargo/bin:${PATH}"

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

COPY . .

# RUN cargo install --path . --root /usr/local
RUN cargo build --release
RUN cp ./target/release/ft /usr/local/bin/ft
RUN ft --help
#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

#RUN cargo install --path . --root /usr/local
13 changes: 11 additions & 2 deletions NOTES.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
how to install pytorch on conda with gpu
mamba install pytorch=1.12 torchvision torchaudio pytorch-cuda=11.6 -c pytorch -c nvidia -c conda-forge
# How to install pytorch on conda with gpu

```
mamba install pytorch=1.12 torchvision torchaudio pytorch-cuda=11.6 -c pytorch -c nvidia
```

# How to make the docker image using the Dockerfile

```
docker build --progress=plain -f Dockerfile .
```

0 comments on commit ff5759e

Please sign in to comment.