Fix: Dockerfile Building Locally
wangzhe258369 opened this issue · comments
Lines 49 to 58 in 3286db5
需要修改如下:
- 添加
/chatglm.cpp/build/lib
,否则对于For CUDA support
的main
程序,会缺少libggml.so
- 对
pip install
添加--pre
,否则pip install -f dist 'chatglm-cpp[api]'
会忽略dist
目录下的新构建的Python包,而是下载编译 pypi 里的正式版本
COPY --from=build /chatglm.cpp/build/bin/main /chatglm.cpp/build/bin/main
COPY --from=build /chatglm.cpp/build/lib /chatglm.cpp/build/lib
COPY --from=build /chatglm.cpp/dist/ /chatglm.cpp/dist/
ADD examples examples
RUN \
python3 -m pip install --upgrade -i https://pypi.tuna.tsinghua.edu.cn/simple pip && \
python3 -m pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple && \
python3 -m pip install --no-cache-dir --pre -f dist 'chatglm-cpp[api]' && \
rm -rf dist