luoyutianyang commited on
Commit
d0d7d79
·
verified ·
1 Parent(s): de04bc2

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +1 -43
Dockerfile CHANGED
@@ -1,46 +1,4 @@
1
- # 使用默认最新版 Node.js 镜像作为基础镜像
2
- FROM node:latest
3
-
4
- # 添加 Python3 和相关工具
5
- RUN apt-get update && apt-get install -y python3 python3-pip python3.11-venv
6
-
7
- # 安装必要的工具和依赖包
8
- RUN apt-get update && apt-get install -y \
9
- build-essential \
10
- python-is-python3 \
11
- cmake \
12
- git \
13
- ffmpeg \
14
- libavcodec-dev \
15
- libavformat-dev \
16
- libswscale-dev \
17
- libopencv-dev \
18
- v4l-utils \
19
- libv4l-dev \
20
- libgtk2.0-dev \
21
- pkg-config \
22
- gstreamer1.0-tools \
23
- gstreamer1.0-plugins-base \
24
- gstreamer1.0-plugins-good \
25
- gstreamer1.0-plugins-bad \
26
- gstreamer1.0-plugins-ugly \
27
- gstreamer1.0-libav
28
-
29
- # 安装 pnpm
30
- RUN npm install -g pnpm
31
-
32
- # 安装全局 opencv-build
33
- RUN pnpm install --global opencv-build
34
-
35
- # 确认全局 node_modules 目录
36
- RUN npm -g root
37
-
38
- # 克隆 opencv4nodejs 仓库并安装依赖项
39
- RUN cd $(npm -g root) && \
40
- git clone https://github.com/justadudewhohacks/opencv4nodejs.git && \
41
- cd opencv4nodejs && \
42
- pnpm install -g nan native-node-utils npmlog && \
43
- node install/install.js
44
 
45
  # 创建工作目录
46
  WORKDIR /app
 
1
+ FROM justadudewhohacks/opencv-nodejs
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
  # 创建工作目录
4
  WORKDIR /app