dockerfile update

This commit is contained in:
13339479676 2022-02-06 08:33:48 +08:00
parent 69bce72616
commit 531c1481f3
2 changed files with 20 additions and 3 deletions

View File

@ -1,17 +1,26 @@
# 图片格式
*.jpg
*.jpeg
*.png
*.svg
*.gif
# 视频格式
*.mp4
*.avi
.ipynb_checkpoints
__pycache__
/utils/__pycache__
/DateFrames
# 日志格式
*.log
*.csv
*.data
*.txt
*.csv
# 参数文件
*.yaml
*.json
@ -20,6 +29,14 @@ __pycache__
*.tar
*.tar.gz
*.rar
/CompressFrames
# 字体格式
/fonts
/utils/fonts
*.ttc
*.ttf
*.otf
test.py
/log

View File

@ -127,7 +127,7 @@ bash ./setup.sh
📌 第二步执行pip指令
```shell
pip install opencv-webcam-script==0.4.0
pip install opencv-webcam-script==0.5.0
```
📌 第三步编写python程序
@ -152,7 +152,7 @@ webcam_opencv(is_autoSaveFrame=True, is_compress=True) # 压缩帧
📌 第一步:下载镜像
```shell
sudo docker pull zengdockerdocker/opencv-webcam-script:v0.4 # 镜像拉取
sudo docker pull zengdockerdocker/opencv-webcam-script:v0.5 # 镜像拉取
```
📌 第二步:创建容器
@ -160,7 +160,7 @@ sudo docker pull zengdockerdocker/opencv-webcam-script:v0.4 # 镜像拉取
```shell
xhost +local:root # 允许root用户访问正在运行的X服务器重要
# 创建名称为ows的容器
sudo docker run --name=ows --ipc=host -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix$DISPLAY --device=/dev/video0:/dev/video0 zengdockerdocker/opencv-webcam-script:v0.4
sudo docker run --name=ows --ipc=host -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix$DISPLAY --device=/dev/video0:/dev/video0 zengdockerdocker/opencv-webcam-script:v0.5
```
📌 第三步:运行程序