模块拆分 init
This commit is contained in:
+11
-12
@@ -1,29 +1,28 @@
|
||||
# Dockerfile for MoldInsight
|
||||
# Legacy Dockerfile for geMoldInsight
|
||||
#
|
||||
# 说明:
|
||||
# 该文件保留为历史/兼容用途,仍按旧的单体入口 `src/main.py` 组织。
|
||||
# 当前模块化部署的主入口应优先使用:
|
||||
# - deploy/Dockerfile.moldinsight
|
||||
# - deploy/Dockerfile.inventory
|
||||
# - deploy/Dockerfile.celery
|
||||
# 以及 deploy/docker-compose.yml
|
||||
|
||||
FROM continuumio/miniconda3:latest
|
||||
|
||||
# 设置工作目录
|
||||
WORKDIR /app
|
||||
|
||||
# 复制项目文件
|
||||
COPY . .
|
||||
|
||||
# 更新conda并创建环境
|
||||
RUN conda update -n base -c defaults conda -y && \
|
||||
conda create -n moldinsight python=3.11 pythonocc-core=7.9.0 -c conda-forge -y
|
||||
|
||||
# 激活环境并安装Python依赖
|
||||
RUN . /opt/conda/etc/profile.d/conda.sh && \
|
||||
conda activate moldinsight && \
|
||||
pip install -r requirements.txt
|
||||
|
||||
# 创建必要的目录
|
||||
RUN mkdir -p uploads html_output logs
|
||||
|
||||
# 设置启动脚本
|
||||
RUN chmod +x start.sh
|
||||
|
||||
# 暴露端口
|
||||
EXPOSE 8000
|
||||
|
||||
# 启动命令(使用shell形式确保环境激活)
|
||||
CMD ["/bin/bash", "-c", "source /opt/conda/etc/profile.d/conda.sh && conda activate moldinsight && python src/main.py"]
|
||||
CMD ["/bin/bash", "-c", "source /opt/conda/etc/profile.d/conda.sh && conda activate moldinsight && python src/main.py"]
|
||||
|
||||
Reference in New Issue
Block a user