File size: 1,551 Bytes
5dd6d71
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
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 useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
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 torch-sparse==0.6.15 torch-scatter==2.0.9 -f https://pytorch-geometric.com/whl/torch-1.11.0%2Bcpu.html
COPY --chmod=777 . /app
CMD ["python3", "app.py"]