allennlp
/
Dockerfile.test
28 строк · 952.0 Байт
1# Used to build an image for running tests.
2
3ARG TORCH=1.12.0-cuda11.3-python3.8
4FROM ghcr.io/allenai/pytorch:${TORCH}
5
6# These environment variables are helpful for debugging.
7# See https://pytorch.org/docs/stable/distributed.html#common-environment-variables for more info.
8ENV NCCL_DEBUG INFO
9ENV NCCL_DEBUG_SUBSYS ALL
10
11WORKDIR /stage/allennlp
12
13# Installing AllenNLP's dependencies is the most time-consuming part of building
14# this Docker image, so we make use of layer caching here by adding the minimal files
15# necessary to install the dependencies.
16COPY allennlp/version.py allennlp/version.py
17COPY setup.py .
18COPY dev-requirements.txt .
19COPY constraints.txt .
20RUN touch allennlp/__init__.py \
21&& touch README.md \
22&& pip install --no-cache-dir -c constraints.txt -e . -r dev-requirements.txt
23
24# Now add the full package source and re-install just the package.
25COPY . .
26RUN pip install --no-cache-dir --no-deps -e .
27
28ENTRYPOINT ["make"]
29