| |
| FROM nvidia/cuda:11.3.1-devel-ubuntu20.04 |
|
|
| |
| ARG DEBIAN_FRONTEND=noninteractive |
|
|
| |
| RUN mkdir -p /app |
| WORKDIR /app |
|
|
| |
| RUN apt-get -qq update && \ |
| apt-get -qq install -y --no-install-recommends curl git python3-pip python3-dev |
|
|
| |
| RUN pip3 install --upgrade torch torchvision torchaudio |
|
|
| |
| RUN git clone https://github.com/NVIDIA/apex.git /app/apex |
| WORKDIR /app/apex |
| RUN git checkout 265b451de8ba9bfcb67edc7360f3d8772d0a8bea |
| RUN pip3 install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" --global-option="--deprecated_fused_adam" --global-option="--xentropy" --global-option="--fast_multihead_attn" ./ |
|
|
| |
|
|
| |
| COPY requirements.txt . |
| RUN pip3 install --no-cache-dir -r requirements.txt |
|
|
| |
| COPY . . |
|
|
| |
| |
|
|
| |
| CMD ["python3", "train.py"] |
|
|