File size: 2,469 Bytes
9b9c66d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
FROM docker.io/ubuntu:22.04

ENV TZ=Asia/Shanghai 
ENV R_REMOTE_ERR=1
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update -y && \
    apt-get install -y --no-install-recommends \
    build-essential \
    software-properties-common \
    dirmngr \
    wget \
    unzip \
    make \
    lsb-release && \
    rm -rf /var/lib/apt/lists/*


RUN apt-get update -y \
    && apt-get -y install iputils-ping \
    && apt-get -y install wget \
    && apt-get -y install net-tools \
    && apt-get -y install vim \
    && apt-get -y install openssh-server \
    && apt-get -y install python3.9 \
    && apt-get -y install python3-pip \
    && apt-get -y install git \
    && cd /usr/local/bin \
    && rm -f python \
    && rm -f python3 \
    && rm -f pip \
    && rm -f pip3 \
    && ln -s /usr/bin/python3.9 python \
    && ln -s /usr/bin/python3.9 python3 \
    && ln -s /usr/bin/pip3 pip \
    && ln -s /usr/bin/pip3 pip3 \
    && apt-get clean
RUN apt install -y libpcre2-dev libdeflate-dev liblzma-dev libbz2-dev libblas-dev gfortran libicu-dev liblapack-dev libxml2-dev
RUN apt install --no-install-recommends software-properties-common dirmngr
RUN  wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
RUN add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"
RUN apt install --no-install-recommends r-base -y
RUN R -e "install.packages('remotes', repos = 'https://cloud.r-project.org/'); \
          remotes::install_version('ape', version = '5.8.1', dependencies = TRUE, repos = 'https://cloud.r-project.org/'); \
          remotes::install_version('igraph', version = '2.1.4', dependencies = TRUE, repos = 'https://cloud.r-project.org/'); \
          remotes::install_version('openxlsx', version = '4.2.8', dependencies = TRUE, repos = 'https://cloud.r-project.org/')" && \
    rm -rf /tmp/Rtmp*
          
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
WORKDIR /app
RUN git clone https://github.com/pylelab/USalign.git
WORKDIR /app/USalign
RUN make
WORKDIR /app
RUN chmod -R 777 /app
COPY --chmod=777 ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
RUN pip install rpy2==3.2.0
RUN pip install pandas==1.5.3
RUN pip install numpy==1.25.0
RUN pip install gradio==5.44.1
COPY --chmod=777 . /app
ENV MPLCONFIGDIR="/home/user/.config/matplotlib" 
CMD ["python3", "app.py"]