Spaces:
Build error
Build error
Update Dockerfile
Browse files123456789101112131415161718192021222324# We use 'python:3.10' instead of 'slim' because the standard version# already has most tools installed, so we don't have to wait for 'apt-get'.FROM python:3.10# Set a working directoryWORKDIR /app# Step 1: Install llama-cpp-python using the PRE-COMPILED link.# This is the "Magic Trick" to skip the 15-minute build.RUN pip install --no-cache-dir llama-cpp-python \--extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu# Step 2: Install your other requirementsCOPY requirements.txt .RUN pip install --no-cache-dir -r requirements.txt# Step 3: Copy your codeCOPY . .# Hugging Face Spaces must run on port 7860EXPOSE 7860# Run your appCMD ["python", "app.py"]1234567891011121314FROM python:3.10WORKDIR /app# 1. Install the FAST version firstRUN pip install llama-cpp-python==0.3.2 --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu# 2. Install ONLY the web stuff (remove llama-cpp from requirements.txt!)COPY requirements.txt .RUN pip install -r requirements.txtCOPY . .EXPOSE 7860CMD ["python", "app.py"]
Dockerfile+4-14