github.com/matrixorigin/matrixone@v1.2.0/optools/images/pythonserver/Dockerfile (about)

     1  # run from root path for debug:
     2  # docker build -t mo-python-udf-server -f ./optools/images/pythonserver/Dockerfile ./pkg/udf/pythonservice/pyserver/
     3  # docker run -d --network host mo-python-udf-server
     4  
     5  FROM python:3.9-bookworm
     6  
     7  RUN useradd -m -s /bin/bash mo
     8  
     9  WORKDIR /home/mo
    10  
    11  # only for debug
    12  #RUN cp /etc/apt/sources.list.d/debian.sources /etc/apt/sources.list.d/ali.sources \
    13  #    && sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list.d/ali.sources \
    14  #    && apt-get update \
    15  #    && apt-get install -y vim
    16  
    17  COPY . .
    18  
    19  RUN pip install -r requirements/base.txt
    20  RUN pip install -r requirements/pytorch.txt
    21  
    22  USER mo
    23  
    24  EXPOSE 50051
    25  
    26  CMD [ "/bin/bash", "-c", "python -u server.py >> server.log 2>&1" ]