-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
42 lines (34 loc) · 1.2 KB
/
Dockerfile
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
FROM stencila/executa-midi
# Based on https://github.com/stencila/dockta#extending-the-images
# Install things with root
USER root
# Download miniconda https://stackoverflow.com/questions/58269375/how-to-install-packages-with-miniconda-in-dockerfile
ENV PATH=/root/miniconda3/bin:$PATH
ARG PATH=/root/miniconda3/bin:$PATH
RUN apt-get update
RUN apt-get install -y wget && rm -rf /var/lib/apt/lists/*
RUN wget \
https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
&& mkdir /root/.conda \
&& bash Miniconda3-latest-Linux-x86_64.sh -b \
&& rm -f Miniconda3-latest-Linux-x86_64.sh
# Add the conda environment to the container
ENV CONDA_ENV bclab
COPY bclab.yml /tmp/$CONDA_ENV.yml
RUN conda env create -q -f /tmp/bclab.yml -n $CONDA_ENV
# Download gkmSVM source code and compile
RUN wget \
http://www.beerlab.org/gkmsvm/downloads/gkmsvm-2.0.tar.gz \
&& tar -zxvf gkmsvm-2.0.tar.gz \
&& rm gkmsvm-2.0.tar.gz \
&& cd gkmsvm \
&& make \
&& mkdir ../bin \
&& mv gkmsvm_kernel gkmsvm_train gkmsvm_classify ../bin/ \
&& cd ../ \
&& rm -r gkmsvm
SHELL ["/bin/bash", "-c"]
RUN conda init
RUN echo 'conda activate bclab' >> ~/.bashrc
# Go back to guest to run the container
USER guest