Skip to content

Commit 028df0a

Browse files
authored
Docker tweaks (EleutherAI#716)
* Omit the checkpoints from the Docker context This speeds up the build of the Docker image. Signed-off-by: Alastair D'Silva <[email protected]> * Build the megatron fused kernels during the Docker build Signed-off-by: Alastair D'Silva <[email protected]> * Downgrade protobuf This solves the following problem: TypeError: Descriptors cannot not be created directly. If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0. If you cannot immediately regenerate your protos, some other possible workarounds are: 1. Downgrade the protobuf package to 3.20.x or lower. Signed-off-by: Alastair D'Silva <[email protected]>
1 parent fe21c3e commit 028df0a

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20B_checkpoints/

Dockerfile

+7-1
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,17 @@ RUN pip install torch==1.8.1+cu111 -f https://download.pytorch.org/whl/torch_sta
7878
COPY requirements/requirements.txt .
7979
COPY requirements/requirements-onebitadam.txt .
8080
COPY requirements/requirements-sparseattention.txt .
81-
RUN pip install -r requirements.txt && pip install -r requirements-onebitadam.txt && pip install -r requirements-sparseattention.txt && pip cache purge
81+
RUN pip install -r requirements.txt && pip install -r requirements-onebitadam.txt && \
82+
pip install -r requirements-sparseattention.txt && \
83+
pip install protobuf==3.20.* && \
84+
pip cache purge
8285

8386
## Install APEX
8487
RUN pip install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" git+https://github.com/NVIDIA/apex.git@a651e2c24ecf97cbf367fd3f330df36760e1c597
8588

89+
COPY megatron/ megatron
90+
RUN python megatron/fused_kernels/setup.py install
91+
8692
# Clear staging
8793
RUN mkdir -p /tmp && chmod 0777 /tmp
8894

0 commit comments

Comments
 (0)