rogerxavier commited on
Commit
601fac8
1 Parent(s): 55fcf06

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +33 -37
Dockerfile CHANGED
@@ -1,35 +1,31 @@
1
- # FROM python:3.9
2
- # RUN apt update && apt install -y libgl1-mesa-glx
3
 
4
 
5
- # ##安装imagemagic
6
- # RUN wget http://www.imagemagick.org/download/ImageMagick.tar.gz
 
 
7
 
8
- # ##安装imagemagic
9
-
10
- # RUN pip install -U pip
11
- # # #RUN pip install -U pyyaml
12
- # # RUN pip install -U runway-python
13
- # # #runway --force-reinstall
14
- # # #RUN pip install -U tensorflow
15
 
16
 
17
- # COPY requirements.txt .
18
- # RUN pip install -r requirements.txt
19
 
20
- # COPY . .
21
 
22
- # #目前的写法是成功找到了magick文件并且python可以执行,就是magick文件没有找对
23
  # # 修改 magick 文件的执行权限
24
  # RUN chmod +x ./magick
25
 
26
  # ENV IMAGEMAGICK_BINARY=./magick
27
 
28
 
29
- # EXPOSE 7860
30
 
31
- # #compo-singleone-v1-dev-acc.py
32
- # CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]
33
 
34
 
35
 
@@ -38,35 +34,35 @@
38
 
39
 
40
 
41
- #现成magick docker镜像测试
42
- #这个dpokidov/imagemagick 含有magick命令
43
- FROM dpokidov/imagemagick
44
 
45
 
46
 
47
- # 安装 Python 3.9
48
- RUN apt-get update && apt-get install -y python3.9 libgl1-mesa-glx libglib2.0-dev
49
 
50
- # 设置 Python 3.9 作为默认 Python 版本
51
- RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1
52
 
53
- # 安装 pip
54
- RUN apt-get install -y python3-pip
55
 
56
- # 升级 pip
57
- RUN python3.9 -m pip install --upgrade pip
58
 
59
- RUN pip install -U pip
60
 
61
- COPY requirements.txt .
62
- RUN pip install -r requirements.txt
63
 
64
- COPY . .
65
 
66
 
67
 
68
- EXPOSE 7860
69
 
70
- #RUN python3 server.py
71
- #结束周期
72
- CMD python3 server.py
 
1
+ FROM python:3.9
2
+ RUN apt update && apt install -y libgl1-mesa-glx
3
 
4
 
5
+ ##安装imagemagic ,linux使用convert路径即可
6
+ RUN apt install -y ImageMagick
7
+ ENV IMAGEMAGICK_BINARY=convert
8
+ ##安装imagemagic
9
 
10
+ RUN pip install -U pip
 
 
 
 
 
 
11
 
12
 
13
+ COPY requirements.txt .
14
+ RUN pip install -r requirements.txt
15
 
16
+ COPY . .
17
 
18
+ # #目前的写法是成功找到了magick文件并且python可以执行,就是magick文件没有找对 -因为找convert才对
19
  # # 修改 magick 文件的执行权限
20
  # RUN chmod +x ./magick
21
 
22
  # ENV IMAGEMAGICK_BINARY=./magick
23
 
24
 
25
+ EXPOSE 7860
26
 
27
+ #server.py
28
+ CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]
29
 
30
 
31
 
 
34
 
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
 
62
 
63
 
64
+ # EXPOSE 7860
65
 
66
+ # #RUN python3 server.py
67
+ # #结束周期
68
+ # CMD python3 server.py