-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
58 lines (49 loc) · 1.68 KB
/
Dockerfile
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
FROM nvidia/cuda:11.3.1-runtime-ubuntu20.04
# todo: rm once nvidia updates their docker images
RUN apt-key adv --fetch-keys \
https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub 3
RUN apt-key adv --fetch-keys \
https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
ARG DEBIAN_FRONTEND=noninteractive
ARG PYTHON_VERSION=3.8
ARG GIT_BRANCH=master
ARG TOX_VERSION=3.24.0
ARG UTC_DATE
# todo: enable docker image layer caching on circleci
RUN apt-get update && apt-get install -y --no-install-recommends \
vim \
curl \
ca-certificates \
sudo \
git \
python${PYTHON_VERSION} \
python3-pip \
python${PYTHON_VERSION}-dev \
build-essential \
libsndfile1 \
ffmpeg \
libcudnn8 \
&& apt-get clean && rm -rf /var/lib/apt/lists/* \
&& ln -s /usr/bin/python3 /usr/bin/python
RUN mkdir /wandb
WORKDIR /wandb
RUN adduser --disabled-password --gecos '' --shell /bin/bash sdk \
&& adduser sdk sudo\
&& chown -R sdk:sdk /wandb
RUN echo "sdk ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/90-sdk
USER sdk
ENV HOME=/home/sdk
RUN chmod 777 /home/sdk
# clone wandb/client repository and install wandb sdk
RUN git clone https://github.com/wandb/client.git /wandb/client \
&& cd /wandb/client \
&& git checkout ${GIT_BRANCH} \
&& pip install --upgrade pip \
&& pip install tox==${TOX_VERSION} --no-cache-dir
RUN PATH=/home/sdk/.local/bin:$PATH
WORKDIR /wandb/client
# use torch wheels with CUDA 11.3 support
RUN sed -i -e 's/whl\/cpu/whl\/cu113/g' tox.ini
ENV DATE=$UTC_DATE
#CMD ["tail", "-f", "/dev/null"]
CMD ["python", "-m", "tox", "-v", "-e", "standalone-gpu-py38"]