Spaces:
OrbitMC
/
Runtime error

File size: 825 Bytes
2f1397e
b0a95c7
8ad1e9d
 
 
 
 
 
 
 
b0a95c7
8ad1e9d
2f1397e
8ad1e9d
 
 
 
2f1397e
 
8ad1e9d
 
 
 
 
 
 
 
 
 
2f1397e
5c919ff
db1556d
2f1397e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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"]