# syntax=docker/dockerfile:1 # NOTE: Building this image require's docker version >= 23.0. # # For reference: # - https://docs.docker.com/build/dockerfile/frontend/#stable-channel ARG TAG_VERSION="22.04" FROM ubuntu:${TAG_VERSION} ARG HTTP_PROXY ARG HTTPS_PROXY ENV http_proxy=${HTTP_PROXY} ENV https_proxy=${HTTPS_PROXY} ARG DEBIAN_FRONTEND="noninteractive" ENV DEBIAN_FRONTEND=${DEBIAN_FRONTEND} ARG ROOT_PASSWD="root" ENV ROOT_PASSWD=${ROOT_PASSWD} ENV SSH_PORT=3322 SHELL ["/bin/bash", "-c"] # Set working directory WORKDIR /app # base tools RUN < ~/.ssh/config cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config sed -i 's/#PubkeyAuthentication yes/PubkeyAuthentication yes/' /etc/ssh/sshd_config sed -i 's/^\(\s*\)GSSAPIAuthentication yes/\1GSSAPIAuthentication no/' /etc/ssh/ssh_config sed -i "s/^#Port 22/Port ${SSH_PORT}/" /etc/ssh/sshd_config sudo sed -i "s/# Port 22/Port ${SSH_PORT}/" /etc/ssh/ssh_config ssh-keygen -t rsa -b 4096 -f /root/.ssh/id_rsa -N "" <<< y cat ~/.ssh/id_rsa.pub >> ~/.ssh/auth cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys2 chmod 600 /root/.ssh/authorized_keys chmod 600 /root/.ssh/authorized_keys2 mkdir /var/run/sshd echo "root:${ROOT_PASSWD}" | chpasswd mkdir -p ~/.pip apt-get clean && rm -rf /var/lib/apt/lists/* EOT # Copy files COPY .condarc mutation.py test.list _foldxLinux64.tar_.gz EvoEF2-master.zip install_scwrl4.0.2_64bit_2020_linux .condarc /app ARG CONDA_ENV_NAME="mutation" ENV CONDA_ENV_NAME=${CONDA_ENV_NAME} ARG PYTHON_VERSION="3.10" ENV PYTHON_VERSION=${PYTHON_VERSION} # https://github.com/opendatalab/PDF-Extract-Kit RUN <> ~/.bashrc . /opt/conda/etc/profile.d/conda.sh conda init bash conda config --set show_channel_urls true # 配置 .condarc 文件 cat < ~/.condarc channels: - conda-forge - bioconda - pytorch - pytorch-nightly - nvidia - defaults - r - https://levinthal:paradox@conda.graylab.jhu.edu show_channel_urls: true EOF source /opt/conda/etc/profile.d/conda.sh conda create -n ${CONDA_ENV_NAME} python=${PYTHON_VERSION} click loguru biopython pymol-open-source pyrosetta -y conda activate ${CONDA_ENV_NAME} rm -rf EvoEF2-master.zip EOT VOLUME ["/app"] EXPOSE 3322 CMD ["/usr/sbin/sshd", "-D"]