Download Dockerfile from rzline/api: direct link, hf CLI and curl.
- Browser
- Download file 598 Bytes
-
https://huggingface.co/spaces/rzline/api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/rzline/api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/rzline/api/resolve/main/Dockerfile
598 Bytes
| # 使用uni-api官方镜像 | |
| FROM yym68686/uni-api:latest | |
| # 创建数据目录并设置权限 | |
| RUN mkdir -p /data && chown -R 1000:1000 /data | |
| # 设置用户和工作目录 | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH \ | |
| DISABLE_DATABASE=true | |
| # 复制入口点脚本 | |
| COPY --chown=user entrypoint.sh /home/user/entrypoint.sh | |
| RUN chmod +x /home/user/entrypoint.sh | |
| # 确保/home目录可写(这很重要!) | |
| USER root | |
| RUN chmod 777 /home | |
| USER user | |
| # 设置工作目录 | |
| WORKDIR /home/user | |
| # 入口点 | |
| ENTRYPOINT ["/home/user/entrypoint.sh"] |