forked from allenai/allennlp-models
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.test
32 lines (23 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.
FROM python:3.8
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64
# Tell nvidia-docker the driver spec that we need as well as to
# use all available devices, which are mounted at /usr/local/nvidia.
# The LABEL supports an older version of nvidia-docker, the env
# variables a newer one.
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility
LABEL com.nvidia.volumes.needed="nvidia_driver"
WORKDIR /stage/allennlp-models
# Our self-hosted runner currently has CUDA 11.0.
RUN pip install --no-cache-dir torch==1.7.0+cu110 -f https://download.pytorch.org/whl/torch_stable.html
COPY requirements.txt requirements.txt
COPY dev-requirements.txt dev-requirements.txt
COPY constraints.txt constraints.txt
ARG ALLENNLP_COMMIT_SHA
RUN pip install --no-cache-dir -r requirements.txt -c constraints.txt && \
pip install --no-cache-dir -r dev-requirements.txt -c constraints.txt
COPY . .
ENTRYPOINT ["make"]