Spaces:
Runtime error
Runtime error
Download Dockerfile from luoyutianyang/egg-api: direct link, hf CLI and curl.
- Browser
- Download file 481 Bytes
-
https://huggingface.co/spaces/luoyutianyang/egg-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/luoyutianyang/egg-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/luoyutianyang/egg-api/resolve/main/Dockerfile
481 Bytes
| # 使用 urielch/opencv-nodejs 镜像作为基础镜像 | |
| FROM urielch/opencv-nodejs | |
| # 更新 Node.js 到最新的 20 版本 | |
| RUN npm install -g n && n 20.3.0 | |
| # 安装 pnpm | |
| RUN npm install -g pnpm | |
| # 创建工作目录 | |
| WORKDIR /app | |
| COPY . . | |
| # 安装项目依赖 | |
| RUN pnpm install | |
| # 使用 yes 命令模拟空格并批准构建脚本 | |
| RUN { yes " " | head -n 2; yes "y"; } | pnpm approve-builds @u4/opencv4nodejs sharp | |
| # 暴露端口 | |
| EXPOSE 7860 | |
| # 运行 | |
| CMD ["node", "egg-api.js"] |