Spaces:
Runtime error
Runtime error
Download Dockerfile from junaidte14/aiverse: direct link, hf CLI and curl.
- Browser
- Download file 785 Bytes
-
https://huggingface.co/spaces/junaidte14/aiverse/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/junaidte14/aiverse/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/junaidte14/aiverse/resolve/main/Dockerfile
785 Bytes
| FROM python:3.11-slim | |
| # Create a non-root user for Hugging Face compatibility | |
| RUN useradd -m -u 1000 user | |
| WORKDIR /app | |
| # System dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| gcc \ | |
| libpq-dev \ | |
| curl \ | |
| git \ | |
| postgresql-client \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements and install as root to cache globally, | |
| # but ensure the user can access them | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy project files | |
| COPY --chown=user . . | |
| # Adjust permissions for the entrypoint and the app directory | |
| RUN chmod +x entrypoint.sh && chown -R user:user /app | |
| # Switch to the non-root user | |
| USER user | |
| ENV PATH="/home/user/.local/bin:$PATH" | |
| # Hugging Face Spaces MUST use port 7860 | |
| EXPOSE 7860 | |
| CMD ["./entrypoint.sh"] |