Files
DP/PltService/Dockerfile

33 lines
643 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# PLT 处理微服务 Dockerfile
# 用于部署到阿里云 SAE
FROM python:3.10-slim
# 设置工作目录
WORKDIR /app
# 安装系统依赖OpenCV 需要)
RUN apt-get update && apt-get install -y \
libgl1-mesa-glx \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender-dev \
&& rm -rf /var/lib/apt/lists/*
# 复制依赖文件
COPY requirements.txt .
# 安装 Python 依赖
RUN pip install --no-cache-dir -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
# 复制代码
COPY pltreader.py .
COPY main.py .
# 暴露端口SAE 默认使用 8080
EXPOSE 8080
# 启动命令
CMD ["python", "main.py"]