Spaces:
Runtime error
Runtime error
Download Dockerfile from sunwangwang/api-uni: direct link, hf CLI and curl.
- Browser
- Download file 628 Bytes
-
https://huggingface.co/spaces/sunwangwang/api-uni/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/sunwangwang/api-uni/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/sunwangwang/api-uni/resolve/main/Dockerfile
628 Bytes
| # Use the uni-api official image | |
| FROM yym68686/uni-api:latest | |
| # Create data directory and set permissions | |
| RUN mkdir -p /data && chown -R 1000:1000 /data | |
| # Set up user and working directory | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH \ | |
| DISABLE_DATABASE=true | |
| # Copy entrypoint script | |
| COPY --chown=user entrypoint.sh /home/user/entrypoint.sh | |
| RUN chmod +x /home/user/entrypoint.sh | |
| # Ensure /home directory is writable (this is important!) | |
| USER root | |
| RUN chmod 777 /home | |
| USER user | |
| # Set working directory | |
| WORKDIR /home/user | |
| # Entry point | |
| ENTRYPOINT ["/home/user/entrypoint.sh"] |