为照片涂抹编写docker
This commit is contained in:
22
Dockerfile
Normal file
22
Dockerfile
Normal file
@@ -0,0 +1,22 @@
|
||||
# 使用官方的paddle镜像作为基础
|
||||
FROM registry.baidubce.com/paddlepaddle/paddle:2.6.1-gpu-cuda12.0-cudnn8.9-trt8.6
|
||||
|
||||
# 设置工作目录
|
||||
WORKDIR /app
|
||||
|
||||
# 设置环境变量
|
||||
ENV PYTHONUNBUFFERED=1 \
|
||||
# 设置pip镜像地址,加快安装速度
|
||||
PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
|
||||
# 将当前目录内容复制到容器的/app内
|
||||
COPY . /app
|
||||
|
||||
# 安装任何需要的包
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# 暴露端口
|
||||
# EXPOSE 8081
|
||||
|
||||
# 运行python脚本,具体脚本在命令行或docker-compose.yml文件中定义
|
||||
ENTRYPOINT ["python"]
|
||||
Reference in New Issue
Block a user