rogerxavier
commited on
Commit
•
78fa7f6
1
Parent(s):
f3d50ac
Update Dockerfile
Browse files- Dockerfile +18 -18
Dockerfile
CHANGED
@@ -35,39 +35,39 @@
|
|
35 |
|
36 |
|
37 |
#现成magick docker镜像测试
|
38 |
-
#这个dpokidov/imagemagick 含有magick
|
39 |
FROM dpokidov/imagemagick
|
40 |
|
41 |
-
CMD uvicorn
|
42 |
|
43 |
-
# # 安装 Python 3.9
|
44 |
-
# RUN apt-get update && apt-get install -y python3.9 libgl1-mesa-glx libglib2.0-dev
|
45 |
|
46 |
-
#
|
47 |
-
|
48 |
|
49 |
-
#
|
50 |
-
|
51 |
|
52 |
-
#
|
53 |
-
|
54 |
|
55 |
-
#
|
|
|
56 |
|
57 |
-
|
58 |
-
# RUN pip install -r requirements.txt
|
59 |
|
60 |
-
|
61 |
-
|
62 |
-
# RUN pip install uvicorn
|
63 |
|
|
|
|
|
|
|
64 |
|
65 |
|
66 |
-
# EXPOSE 7860
|
67 |
|
68 |
-
|
|
|
69 |
# CMD ["/usr/local/lib/Scripts/uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]
|
70 |
|
|
|
71 |
|
72 |
|
73 |
|
|
|
35 |
|
36 |
|
37 |
#现成magick docker镜像测试
|
38 |
+
#这个dpokidov/imagemagick 含有magick命令
|
39 |
FROM dpokidov/imagemagick
|
40 |
|
|
|
41 |
|
|
|
|
|
42 |
|
43 |
+
# 安装 Python 3.9
|
44 |
+
RUN apt-get update && apt-get install -y python3.9 libgl1-mesa-glx libglib2.0-dev
|
45 |
|
46 |
+
# 设置 Python 3.9 作为默认 Python 版本
|
47 |
+
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1
|
48 |
|
49 |
+
# 安装 pip
|
50 |
+
RUN apt-get install -y python3-pip
|
51 |
|
52 |
+
# 升级 pip
|
53 |
+
RUN python3.9 -m pip install --upgrade pip
|
54 |
|
55 |
+
RUN pip install -U pip
|
|
|
56 |
|
57 |
+
COPY requirements.txt .
|
58 |
+
RUN pip install -r requirements.txt
|
|
|
59 |
|
60 |
+
COPY . .
|
61 |
+
# 安装 uvicorn
|
62 |
+
RUN pip install uvicorn
|
63 |
|
64 |
|
|
|
65 |
|
66 |
+
EXPOSE 7860
|
67 |
+
|
68 |
# CMD ["/usr/local/lib/Scripts/uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]
|
69 |
|
70 |
+
CMD ["/usr/bin/python3.9", "-m", "uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]
|
71 |
|
72 |
|
73 |
|