Spaces:
Running
Running
| # This image comes with llama-cpp-python PRE-INSTALLED and optimized | |
| FROM ghcr.io/abetlen/llama-cpp-python:latest | |
| # Switch to root to set up the HF user | |
| USER root | |
| RUN apt-get update && apt-get install -y curl git procps && rm -rf /var/lib/apt/lists/* | |
| # Setup HF compatible user | |
| RUN useradd -m -u 1000 user | |
| WORKDIR /home/user/app | |
| # Install the few extra things we need | |
| RUN pip install --no-cache-dir gradio huggingface-hub hf-transfer | |
| # Give permissions to the user | |
| RUN chown -R user:user /home/user/app | |
| USER user | |
| COPY --chown=user . . | |
| # Use the same app.py logic | |
| CMD ["python", "-u", "app.py"] |