Spaces:
OrbitMC
/
Runtime error

Ana-2 / Dockerfile
OrbitMC's picture
Update Dockerfile
8ad1e9d verified
FROM python:3.10-slim
# Install gcc FIRST before anything else
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
curl \
gcc \
g++ \
&& rm -rf /var/lib/apt/lists/*
# Download the model
RUN mkdir -p /opt/models && \
curl -L \
-H "User-Agent: Mozilla/5.0" \
-o /opt/models/model.gguf \
"https://huggingface.co/HauhauCS/Qwen3.5-4B-Uncensored-HauhauCS-Aggressive/resolve/main/Qwen3.5-4B-Uncensored-HauhauCS-Aggressive-Q4_K_M.gguf"
WORKDIR /app
# Build llama-cpp-python from source (CPU only, no CUDA)
ENV CMAKE_ARGS="-DGGML_CUDA=OFF -DGGML_METAL=OFF"
ENV FORCE_CMAKE=1
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir llama-cpp-python==0.3.9
RUN pip install --no-cache-dir flask==3.0.0
COPY . .
EXPOSE 7860
CMD ["python", "app.py"]