Spaces:
Paused
Paused
Download Dockerfile from javaeeduke/om: direct link, hf CLI and curl.
- Browser
- Download file 549 Bytes
-
https://huggingface.co/spaces/javaeeduke/om/resolve/47b2811e6151df1bbb1fa1c663df5a8136fb96f0/Dockerfile
- Command line
-
hf download hf://spaces/javaeeduke/om@47b2811e6151df1bbb1fa1c663df5a8136fb96f0/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/javaeeduke/om/resolve/47b2811e6151df1bbb1fa1c663df5a8136fb96f0/Dockerfile
549 Bytes
| FROM node:20-alpine | |
| # 安装 git 以及运行、编译 SQLite 必须的原生 Linux 依赖包 | |
| RUN apk add --no-cache git python3 make g++ sqlite sqlite-dev | |
| WORKDIR /app | |
| # 1. 抓取源码 | |
| RUN git clone https://github.com/diegosouzapw/OmniRoute.git . | |
| # 2. 强行在安装依赖时触发 better-sqlite3 针对当前 Linux 环境的现场编译 | |
| RUN npm install --include=dev | |
| # 锁死 Hugging Face 专属端口 | |
| ENV PORT=7860 | |
| ENV OMNIROUTE_PORT=7860 | |
| ENV HOST=0.0.0.0 | |
| EXPOSE 7860 | |
| # 3. 继续用免编译的开发模式启动 | |
| CMD ["npm", "run", "dev"] |