31 lines
1.1 KiB
Plaintext
31 lines
1.1 KiB
Plaintext
|
||
# 从NVIDIA源,从而支持显卡运损(检查宿主的nvidia-smi中的cuda版本必须>=11.3)
|
||
FROM nvidia/cuda:11.3.1-runtime-ubuntu20.04
|
||
RUN apt-get update
|
||
RUN apt-get install -y curl proxychains curl gcc
|
||
RUN apt-get install -y git python python3 python-dev python3-dev --fix-missing
|
||
|
||
|
||
# use python3 as the system default python
|
||
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.8
|
||
# 下载pytorch
|
||
RUN python3 -m pip install torch --extra-index-url https://download.pytorch.org/whl/cu113
|
||
# 下载分支
|
||
WORKDIR /gpt
|
||
RUN git clone --depth=1 https://github.com/binary-husky/gpt_academic.git
|
||
WORKDIR /gpt/gpt_academic
|
||
RUN git clone https://github.com/OpenLMLab/MOSS.git request_llms/moss
|
||
RUN python3 -m pip install -r requirements.txt
|
||
RUN python3 -m pip install -r request_llms/requirements_moss.txt
|
||
RUN python3 -m pip install -r request_llms/requirements_qwen.txt
|
||
RUN python3 -m pip install -r request_llms/requirements_chatglm.txt
|
||
RUN python3 -m pip install -r request_llms/requirements_newbing.txt
|
||
|
||
|
||
|
||
# 预热Tiktoken模块
|
||
RUN python3 -c 'from check_proxy import warm_up_modules; warm_up_modules()'
|
||
|
||
# 启动
|
||
CMD ["python3", "-u", "main.py"]
|