monorepo-microservice-rbac/PyBlender.dockerfile

24 lines
543 B
Plaintext
Raw Normal View History

2023-09-06 17:01:45 +08:00
# 使用预先构建的Blender镜像
FROM zocker160/blender-bpy:stable
# 安装Python库和工具
RUN apt-get update && apt-get install -y \
python3-pip
# 安装Python依赖
RUN pip3 install fastapi uvicorn python-multipart
# 设置工作目录
WORKDIR /workspace
RUN mkdir /workspace/temp
# 复制API和处理脚本到容器内
COPY ./api_script.py /workspace/
COPY ./add_thickness.py /workspace/
# 暴露FastAPI使用的端口
EXPOSE 8000
# 设置启动命令
CMD ["uvicorn", "api_script:app", "--host", "0.0.0.0", "--port", "8000"]