mirror of https://github.com/THUDM/ChatGLM2-6B
add docker deployment
parent
3a534decf2
commit
db43bce59c
|
@ -10,7 +10,7 @@ services:
|
|||
working_dir: /app
|
||||
ports:
|
||||
- "9000:8000"
|
||||
command: bash -c "python api.py"
|
||||
command: bash -c "python web_demo.py"
|
||||
deploy:
|
||||
resources:
|
||||
reservations:
|
||||
|
|
|
@ -9,8 +9,10 @@ RUN apt update && apt-get -y install git wget \
|
|||
RUN ln -s /usr/bin/python3.10 /usr/bin/python
|
||||
RUN useradd -ms /bin/bash usera
|
||||
WORKDIR /app
|
||||
ADD . .
|
||||
ADD .requirements .
|
||||
RUN pip config set global.index-url https://mirrors.cloud.tencent.com/pypi/simple
|
||||
RUN pip config set global.trusted-host mirrors.cloud.tencent.com
|
||||
RUN pip install -r requirements.txt --no-cache-dir
|
||||
|
||||
ADD . .
|
||||
# preinstall model
|
||||
RUN python -c "from transformers import AutoTokenizer, AutoModel; AutoModel.from_pretrained('THUDM/chatglm2-6b', trust_remote_code=True)"
|
Loading…
Reference in New Issue