Download Dockerfile from Selinore/cli: direct link, hf CLI and curl.
- Browser
- Download file 716 Bytes
-
https://huggingface.co/spaces/Selinore/cli/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Selinore/cli/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Selinore/cli/resolve/main/Dockerfile
716 Bytes
| FROM eceasy/cli-proxy-api:latest | |
| USER root | |
| # 安装必要依赖 | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| bash \ | |
| ca-certificates \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| # 复制二进制文件 | |
| RUN cp /CLIProxyAPI/CLIProxyAPI ./cli-proxy-api && chmod +x ./cli-proxy-api | |
| # 创建必要目录 | |
| RUN mkdir -p /tmp/.cli-proxy-api /tmp/logs /tmp/pg_cache/pgstore \ | |
| && chmod -R 777 /tmp | |
| # 复制配置文件 | |
| COPY config.yaml /app/config.yaml | |
| # 关键:程序启动时需要此文件,否则报错 | |
| RUN cp /app/config.yaml /app/config.example.yaml | |
| ENV TZ=Asia/Shanghai | |
| EXPOSE 7860 | |
| # 直接运行,不使用 Nginx | |
| CMD ["./cli-proxy-api", "--config", "/app/config.yaml"] |