File size: 661 Bytes
d519e8c
 
40dd6d2
d519e8c
40dd6d2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 固定带Python3.10、CUDA12.1的镜像,不再用latest
FROM huggingface/transformers-pytorch-gpu:4.48.2-py310-cu121

# 编译flash-attn系统依赖
RUN apt-get update && apt-get install -y --no-install-recommends \
    gcc g++ build-essential ninja-build cuda-nvcc-12-1 \
    && rm -rf /var/lib/apt/lists/*

RUN pip install --upgrade pip setuptools wheel ninja

COPY requirements.txt /tmp/requirements.txt
RUN MAX_JOBS=2 pip install \
    --no-cache-dir \
    --no-binary flash-attn \
    --no-build-isolation \
    -r /tmp/requirements.txt \
    gradio[oauth]==5.25.2 \
    "uvicorn>=0.14.0" \
    "websockets>=10.4" \
    spaces

CMD ["python", "app.py"]