forked from zhongxinghong/PKUAutoElective
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
98 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# PKUAutoElective Docker Image | ||
|
||
依赖于原项目v2.0.2(2019.09.09)版本。 | ||
|
||
## Tags | ||
|
||
1. latest | ||
2. monitor | ||
|
||
## latest | ||
|
||
包含python3,依赖库,以及项目源代码。 | ||
|
||
### 运行方法 | ||
|
||
``` bash | ||
docker run -d \ | ||
--name=pae \ | ||
-v /path/to/config/folder:/config \ | ||
yousiki/pkuautoelective:latest # 运行工具 | ||
docker logs pae # 查看输出 | ||
docker stop pae # 停止工具 | ||
``` | ||
|
||
## monitor | ||
|
||
额外包含Monitor运行依赖的库。 | ||
|
||
### 运行方法 | ||
|
||
`config.ini`中的`host`值建议设为`0.0.0.0` | ||
|
||
``` bash | ||
docker run -d \ | ||
--name=pae \ | ||
-p 7074:7074 \ | ||
-v /path/to/config/folder:/config \ | ||
yousiki/pkuautoelective:latest # 运行工具 | ||
docker logs pae # 查看输出 | ||
docker stop pae # 停止工具 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM python:slim | ||
|
||
LABEL maintainer="[email protected]" | ||
|
||
RUN pip install --no-cache-dir \ | ||
-i https://pypi.tuna.tsinghua.edu.cn/simple \ | ||
lxml \ | ||
numpy \ | ||
Pillow \ | ||
sklearn \ | ||
requests \ | ||
simplejson | ||
|
||
ADD . /workspace | ||
|
||
VOLUME [ "/config" ] | ||
|
||
WORKDIR /workspace | ||
|
||
CMD [ \ | ||
"python", \ | ||
"main.py", \ | ||
"--with-monitor", \ | ||
"--config=/config/config.ini", \ | ||
"--course-csv-gbk=/config/course.gbk.csv", \ | ||
"--course-csv-utf8=/config/course.utf-8.csv" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
FROM python:slim | ||
|
||
LABEL maintainer="[email protected]" | ||
|
||
RUN pip install --no-cache-dir \ | ||
-i https://pypi.tuna.tsinghua.edu.cn/simple \ | ||
lxml \ | ||
numpy \ | ||
Pillow \ | ||
sklearn \ | ||
requests \ | ||
simplejson | ||
|
||
RUN pip install --no-cache-dir \ | ||
-i https://pypi.tuna.tsinghua.edu.cn/simple \ | ||
flask \ | ||
werkzeug | ||
|
||
ADD . /workspace | ||
|
||
VOLUME [ "/config" ] | ||
|
||
WORKDIR /workspace | ||
|
||
CMD [ \ | ||
"python", \ | ||
"main.py", \ | ||
"--with-monitor", \ | ||
"--config=/config/config.ini", \ | ||
"--course-csv-gbk=/config/course.gbk.csv", \ | ||
"--course-csv-utf8=/config/course.utf-8.csv" ] |