support kunlun r200

This commit is contained in:
aiyueqi
2025-09-22 15:13:55 +08:00
commit b4ef4b9aaa
6 changed files with 181 additions and 0 deletions

17
Dockerfile Normal file
View File

@@ -0,0 +1,17 @@
#FROM git.modelhub.org.cn:980/enginex-kunlunxin/xmlir/r200-8f_xmlir-ubuntu_2004_x86_64:v0.27
FROM diffuser:r200-8f
ENV HF_ENDPOINT=https://hf-mirror.com
RUN /root/miniconda/envs/python38_torch201_cuda/bin/python3 -m pip install transformers==4.46.3 uvicorn\[standard\] fastapi -i https://pypi.tuna.tsinghua.edu.cn/simple
WORKDIR /app
COPY ./ /app
RUN sed -i 's/(inv_freq_expanded\.float() @ position_ids_expanded\.float())/(inv_freq_expanded.float().clone() @ position_ids_expanded.float().clone())/g' /root/miniconda/envs/python38_torch201_cuda/lib/python3.8/site-packages/transformers/models/llama/modeling_llama.py
EXPOSE 8000
CMD ["sh", "-c", "/root/miniconda/envs/python38_torch201_cuda/bin/python3 server.py"]