FROM wjie520/vllm_kunlun:base_v0.0.2

WORKDIR /workspace

ARG PIP_INDEX_URL="https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple"

# Install vLLM
RUN uv pip install vllm==0.11.0 --no-build-isolation --no-deps -i ${PIP_INDEX_URL}

# Install vllm-kunlun and vxpu
COPY . /workspace/vLLM-Kunlun/

RUN cd /workspace/vLLM-Kunlun/ \ 
    && uv pip install -r requirements.txt -i ${PIP_INDEX_URL} \
    && python setup.py build_ext \
    && uv pip install -e . \
    && cd /workspace/vLLM-Kunlun/vllm_kunlun/csrc/vxpu_offload/ \
    && make install && make clean
    
CMD ["/bin/bash"]
