forked from allenai/allennlp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.test
32 lines (25 loc) · 1 KB
/
Dockerfile.test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Used to build an image for running tests.
ARG TORCH=1.10.0-cuda11.3
FROM ghcr.io/allenai/pytorch:${TORCH}
RUN apt-get update && apt-get install -y \
build-essential \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# These environment variables are helpful for debugging.
# See https://pytorch.org/docs/stable/distributed.html#common-environment-variables for more info.
ENV NCCL_DEBUG INFO
ENV NCCL_DEBUG_SUBSYS ALL
WORKDIR /stage/allennlp
# Installing AllenNLP's dependencies is the most time-consuming part of building
# this Docker image, so we make use of layer caching here by adding the minimal files
# necessary to install the dependencies.
COPY allennlp/version.py allennlp/version.py
COPY setup.py .
COPY dev-requirements.txt .
RUN touch allennlp/__init__.py \
&& touch README.md \
&& pip install --no-cache-dir -e . -r dev-requirements.txt
# Now add the full package source and re-install just the package.
COPY . .
RUN pip install --no-cache-dir --no-deps -e .
ENTRYPOINT ["make"]