update
This commit is contained in:
69
docker/Dockerfile
Normal file
69
docker/Dockerfile
Normal file
@@ -0,0 +1,69 @@
|
||||
# 使用 Ubuntu 22.04 作为基础镜像(使用腾讯云镜像源)
|
||||
FROM ccr.ccs.tencentyun.com/library/ubuntu:22.04
|
||||
|
||||
# 设置环境变量
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV PATH="/root/.pixi/bin:$PATH"
|
||||
|
||||
# 配置 APT 镜像源(使用阿里云镜像)
|
||||
RUN sed -i 's@//.*archive.ubuntu.com@//mirrors.aliyun.com@g' /etc/apt/sources.list && \
|
||||
sed -i 's@//.*security.ubuntu.com@//mirrors.aliyun.com@g' /etc/apt/sources.list
|
||||
|
||||
# 安装系统依赖
|
||||
RUN apt-get update && apt-get install -y \
|
||||
curl \
|
||||
wget \
|
||||
git \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
gnupg \
|
||||
lsb-release \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# 配置 pip 镜像源
|
||||
RUN mkdir -p /root/.pip && \
|
||||
echo "[global]" > /root/.pip/pip.conf && \
|
||||
echo "index-url = https://pypi.tuna.tsinghua.edu.cn/simple" >> /root/.pip/pip.conf && \
|
||||
echo "trusted-host = pypi.tuna.tsinghua.edu.cn" >> /root/.pip/pip.conf
|
||||
|
||||
# 安装 pixi
|
||||
RUN curl -fsSL https://pixi.sh/install.sh | bash
|
||||
|
||||
# 设置工作目录
|
||||
WORKDIR /app
|
||||
|
||||
# 复制项目文件
|
||||
COPY . .
|
||||
|
||||
# 创建 bin 目录
|
||||
RUN mkdir -p bin
|
||||
|
||||
# 下载 AutoDock Vina 二进制文件
|
||||
ARG VINA_VERSION=1.2.7
|
||||
ARG VINA_PLATFORM=mac_aarch64
|
||||
ARG DOWNLOAD_VINA=true
|
||||
|
||||
RUN if [ "$DOWNLOAD_VINA" = "true" ]; then \
|
||||
curl -L -o ./bin/vina_${VINA_VERSION}_${VINA_PLATFORM} https://github.com/ccsb-scripps/AutoDock-Vina/releases/download/v${VINA_VERSION}/vina_${VINA_VERSION}_${VINA_PLATFORM} && \
|
||||
curl -L -o ./bin/vina_split_${VINA_VERSION}_${VINA_PLATFORM} https://github.com/ccsb-scripps/AutoDock-Vina/releases/download/v${VINA_VERSION}/vina_split_${VINA_VERSION}_${VINA_PLATFORM} && \
|
||||
chmod +x ./bin/vina_*; \
|
||||
fi
|
||||
|
||||
# 添加平台支持并安装 pixi 包
|
||||
RUN /root/.pixi/bin/pixi workspace platform add linux-aarch64 && \
|
||||
/root/.pixi/bin/pixi add rdkit openbabel meeko
|
||||
|
||||
# 设置环境变量
|
||||
ENV PATH="/root/.pixi/bin:/app/bin:$PATH"
|
||||
|
||||
# 创建启动脚本
|
||||
RUN echo '#!/bin/bash\n\
|
||||
source /root/.bashrc\n\
|
||||
exec "$@"' > /entrypoint.sh && \
|
||||
chmod +x /entrypoint.sh
|
||||
|
||||
# 设置入口点
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
# 默认命令
|
||||
CMD ["/root/.pixi/bin/pixi", "shell"]
|
||||
Reference in New Issue
Block a user