rogerxavier
commited on
Commit
•
1ba1ce3
1
Parent(s):
df62ac8
Update Dockerfile
Browse files- Dockerfile +4 -36
Dockerfile
CHANGED
@@ -6,7 +6,9 @@ USER root
|
|
6 |
RUN apt install -y imagemagick
|
7 |
ENV IMAGEMAGICK_BINARY=/usr/bin/convert
|
8 |
#这条命令成效显著 RUN sed -i 's/none/read,write/g' /etc/ImageMagick-6/policy.xml 就是这个原因说unrecogize format
|
9 |
-
RUN sed -i 's/none/read,write/g' /etc/ImageMagick-6/policy.xml
|
|
|
|
|
10 |
##安装imagemagic
|
11 |
|
12 |
RUN pip install -U pip
|
@@ -17,6 +19,7 @@ RUN pip install -r requirements.txt
|
|
17 |
|
18 |
COPY . .
|
19 |
|
|
|
20 |
# 更改文件夹权限 -保存视频,漫画,漫画去印1,漫画裁剪12,裁剪识别合并->output
|
21 |
RUN mkdir output
|
22 |
RUN chmod -R 777 /output
|
@@ -37,38 +40,3 @@ CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
37 |
|
38 |
|
39 |
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
# #现成magick docker镜像测试
|
44 |
-
# #这个dpokidov/imagemagick 含有magick命令
|
45 |
-
# FROM dpokidov/imagemagick
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
# # 安装 Python 3.9
|
50 |
-
# RUN apt-get update && apt-get install -y python3.9 libgl1-mesa-glx libglib2.0-dev
|
51 |
-
|
52 |
-
# # 设置 Python 3.9 作为默认 Python 版本
|
53 |
-
# RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1
|
54 |
-
|
55 |
-
# # 安装 pip
|
56 |
-
# RUN apt-get install -y python3-pip
|
57 |
-
|
58 |
-
# # 升级 pip
|
59 |
-
# RUN python3.9 -m pip install --upgrade pip
|
60 |
-
|
61 |
-
# RUN pip install -U pip
|
62 |
-
|
63 |
-
# COPY requirements.txt .
|
64 |
-
# RUN pip install -r requirements.txt
|
65 |
-
|
66 |
-
# COPY . .
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
# EXPOSE 7860
|
71 |
-
|
72 |
-
# #RUN python3 server.py
|
73 |
-
# #结束周期
|
74 |
-
# CMD python3 server.py
|
|
|
6 |
RUN apt install -y imagemagick
|
7 |
ENV IMAGEMAGICK_BINARY=/usr/bin/convert
|
8 |
#这条命令成效显著 RUN sed -i 's/none/read,write/g' /etc/ImageMagick-6/policy.xml 就是这个原因说unrecogize format
|
9 |
+
#RUN sed -i 's/none/read,write/g' /etc/ImageMagick-6/policy.xml
|
10 |
+
#自定义policy防止限制
|
11 |
+
RUN cp -f ./custom-imagemagick-policy.yml /etc/ImageMagick-6/policy.xml
|
12 |
##安装imagemagic
|
13 |
|
14 |
RUN pip install -U pip
|
|
|
19 |
|
20 |
COPY . .
|
21 |
|
22 |
+
|
23 |
# 更改文件夹权限 -保存视频,漫画,漫画去印1,漫画裁剪12,裁剪识别合并->output
|
24 |
RUN mkdir output
|
25 |
RUN chmod -R 777 /output
|
|
|
40 |
|
41 |
|
42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|