From 348237185f5bbf0b91ff6522b4679e3929ff1116 Mon Sep 17 00:00:00 2001
From: rlyu <rlyu@svi.edu.au>
Date: Sat, 16 Jan 2021 18:41:25 +1100
Subject: [PATCH] docker file for installing sscocaller with nimble

---
 Dockerfile | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/Dockerfile b/Dockerfile
index 9950107..3d33b6b 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -33,7 +33,23 @@ RUN apk add cmake openssl-dev && \
 	make -j4 CFLAGS="-fPIC -O3" install && \
 	cd ../../ && rm -rf libzip-1.6.1*
 
+## libRmath.a
 
+RUN apk update
+RUN \
+    apk add curl-dev
+
+RUN \
+    git clone https://github.com/SurajGupta/r-source/ && \
+    cd r-source && chmod 755 ./configure && \
+    ./configure -with-readline=no --with-x=no --disable-s3 --with-libdeflate && \
+    cd src/nmath/standalone && make && \
+    make install 
+
+RUN \
+    cd / && cp /r-source/src/nmath/standalone/libRmath.a /usr/local/lib/ && \
+    cp /r-source/src/nmath/standalone/libRmath.so /usr/local/lib/
+ 
 ENV PATH=:/root/.nimble/bin:/nim/bin/:$PATH	
 
 RUN \
@@ -48,12 +64,15 @@ RUN \
     make -j4 CFLAGS="-fPIC -O3" install && \
     cd ../ && rm -rf htslib bcftools
 
+ENV HTSLIB=system
+ENV PATH=$PATH:~/.cargo/bin/
+
 ADD . /src/
 
 RUN nimble install -y https://gitlab.svi.edu.au/biocellgen-public/sscocaller.git
 
 RUN ls ~/.nimble/lib/
-ENV LD_LIBRARY_PATH=:/root/.nimble/lib/:$LD_LIBRARY_PATH
+ENV LD_LIBRARY_PATH=:/root/.nimble/lib/:/usr/local/lib/:$LD_LIBRARY_PATH
 
 RUN cp /root/.nimble/bin/sscocaller /usr/bin/
 
-- 
GitLab