improve Docker build and runtime parameters

Modify installation method of extra python library.
Utilize shared memory of the host machine to increase training performance.
This commit is contained in:
S3Studio 2024-03-12 14:05:10 +08:00 committed by liuzhao2
parent 6ebde4f23e
commit 6a5693d11d
2 changed files with 3 additions and 4 deletions

View File

@ -3,11 +3,10 @@ FROM cnstark/pytorch:2.0.1-py3.9.17-cuda11.8.0-ubuntu20.04
WORKDIR /app
COPY requirements.txt /app/
RUN pip install -r requirements.txt && \
pip install tiktoken && \
pip install transformers_stream_generator
RUN pip install -r requirements.txt
COPY . /app/
RUN pip install -e .[deepspeed,metrics,bitsandbytes,qwen]
VOLUME [ "/root/.cache/huggingface/", "/app/data", "/app/output" ]
EXPOSE 7860

View File

@ -12,7 +12,7 @@ services:
- ./output:/app/output
ports:
- "7860:7860"
shm_size: 16G
ipc: host
deploy:
resources:
reservations: